]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/libcxx/src/support/runtime/exception_pointer_unimplemented.ipp
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm-project / libcxx / src / support / runtime / exception_pointer_unimplemented.ipp
1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9
10 #include <stdio.h>
11 #include <stdlib.h>
12
13 namespace std {
14
15 exception_ptr::~exception_ptr() _NOEXCEPT
16 {
17 #  warning exception_ptr not yet implemented
18   fprintf(stderr, "exception_ptr not yet implemented\n");
19   ::abort();
20 }
21
22 exception_ptr::exception_ptr(const exception_ptr& other) _NOEXCEPT
23     : __ptr_(other.__ptr_)
24 {
25 #  warning exception_ptr not yet implemented
26   fprintf(stderr, "exception_ptr not yet implemented\n");
27   ::abort();
28 }
29
30 exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT
31 {
32 #  warning exception_ptr not yet implemented
33   fprintf(stderr, "exception_ptr not yet implemented\n");
34   ::abort();
35 }
36
37 nested_exception::nested_exception() _NOEXCEPT
38     : __ptr_(current_exception())
39 {
40 }
41
42 #if !defined(__GLIBCXX__)
43
44 nested_exception::~nested_exception() _NOEXCEPT
45 {
46 }
47
48 #endif
49
50 _LIBCPP_NORETURN
51 void
52 nested_exception::rethrow_nested() const
53 {
54 #  warning exception_ptr not yet implemented
55   fprintf(stderr, "exception_ptr not yet implemented\n");
56   ::abort();
57 #if 0
58   if (__ptr_ == nullptr)
59       terminate();
60   rethrow_exception(__ptr_);
61 #endif // FIXME
62 }
63
64 exception_ptr current_exception() _NOEXCEPT
65 {
66 #  warning exception_ptr not yet implemented
67   fprintf(stderr, "exception_ptr not yet implemented\n");
68   ::abort();
69 }
70
71 _LIBCPP_NORETURN
72 void rethrow_exception(exception_ptr p)
73 {
74 #  warning exception_ptr not yet implemented
75   fprintf(stderr, "exception_ptr not yet implemented\n");
76   ::abort();
77 }
78
79 } // namespace std