xref: /openbsd-src/gnu/llvm/libcxx/src/support/runtime/exception_pointer_unimplemented.ipp (revision 76d0caaeb19ae0808d90af1d0b3b7b50b3e5383f)
146035553Spatrick// -*- C++ -*-
246035553Spatrick//===----------------------------------------------------------------------===//
346035553Spatrick//
446035553Spatrick// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
546035553Spatrick// See https://llvm.org/LICENSE.txt for license information.
646035553Spatrick// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
746035553Spatrick//
846035553Spatrick//===----------------------------------------------------------------------===//
946035553Spatrick
1046035553Spatrick#include <stdio.h>
1146035553Spatrick#include <stdlib.h>
1246035553Spatrick
1346035553Spatricknamespace std {
1446035553Spatrick
15*76d0caaeSpatrickexception_ptr::~exception_ptr() noexcept
1646035553Spatrick{
1746035553Spatrick#  warning exception_ptr not yet implemented
1846035553Spatrick  fprintf(stderr, "exception_ptr not yet implemented\n");
1946035553Spatrick  ::abort();
2046035553Spatrick}
2146035553Spatrick
22*76d0caaeSpatrickexception_ptr::exception_ptr(const exception_ptr& other) noexcept
2346035553Spatrick    : __ptr_(other.__ptr_)
2446035553Spatrick{
2546035553Spatrick#  warning exception_ptr not yet implemented
2646035553Spatrick  fprintf(stderr, "exception_ptr not yet implemented\n");
2746035553Spatrick  ::abort();
2846035553Spatrick}
2946035553Spatrick
30*76d0caaeSpatrickexception_ptr& exception_ptr::operator=(const exception_ptr& other) noexcept
3146035553Spatrick{
3246035553Spatrick#  warning exception_ptr not yet implemented
3346035553Spatrick  fprintf(stderr, "exception_ptr not yet implemented\n");
3446035553Spatrick  ::abort();
3546035553Spatrick}
3646035553Spatrick
37*76d0caaeSpatricknested_exception::nested_exception() noexcept
3846035553Spatrick    : __ptr_(current_exception())
3946035553Spatrick{
4046035553Spatrick}
4146035553Spatrick
4246035553Spatrick#if !defined(__GLIBCXX__)
4346035553Spatrick
44*76d0caaeSpatricknested_exception::~nested_exception() noexcept
4546035553Spatrick{
4646035553Spatrick}
4746035553Spatrick
4846035553Spatrick#endif
4946035553Spatrick
5046035553Spatrick_LIBCPP_NORETURN
5146035553Spatrickvoid
5246035553Spatricknested_exception::rethrow_nested() const
5346035553Spatrick{
5446035553Spatrick#  warning exception_ptr not yet implemented
5546035553Spatrick  fprintf(stderr, "exception_ptr not yet implemented\n");
5646035553Spatrick  ::abort();
5746035553Spatrick#if 0
5846035553Spatrick  if (__ptr_ == nullptr)
5946035553Spatrick      terminate();
6046035553Spatrick  rethrow_exception(__ptr_);
6146035553Spatrick#endif // FIXME
6246035553Spatrick}
6346035553Spatrick
64*76d0caaeSpatrickexception_ptr current_exception() noexcept
6546035553Spatrick{
6646035553Spatrick#  warning exception_ptr not yet implemented
6746035553Spatrick  fprintf(stderr, "exception_ptr not yet implemented\n");
6846035553Spatrick  ::abort();
6946035553Spatrick}
7046035553Spatrick
7146035553Spatrick_LIBCPP_NORETURN
7246035553Spatrickvoid rethrow_exception(exception_ptr p)
7346035553Spatrick{
7446035553Spatrick#  warning exception_ptr not yet implemented
7546035553Spatrick  fprintf(stderr, "exception_ptr not yet implemented\n");
7646035553Spatrick  ::abort();
7746035553Spatrick}
7846035553Spatrick
7946035553Spatrick} // namespace std
80