]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - src/support/runtime/exception_pointer_unimplemented.ipp
Vendor import of libc++ trunk r300422:
[FreeBSD/FreeBSD.git] / src / support / runtime / exception_pointer_unimplemented.ipp
1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 //                     The LLVM Compiler Infrastructure
5 //
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
10
11 #include <stdio.h>
12 #include <stdlib.h>
13
14 namespace std {
15
16 exception_ptr::~exception_ptr() _NOEXCEPT
17 {
18 #  warning exception_ptr not yet implemented
19   fprintf(stderr, "exception_ptr not yet implemented\n");
20   ::abort();
21 }
22
23 exception_ptr::exception_ptr(const exception_ptr& other) _NOEXCEPT
24     : __ptr_(other.__ptr_)
25 {
26 #  warning exception_ptr not yet implemented
27   fprintf(stderr, "exception_ptr not yet implemented\n");
28   ::abort();
29 }
30
31 exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT
32 {
33 #  warning exception_ptr not yet implemented
34   fprintf(stderr, "exception_ptr not yet implemented\n");
35   ::abort();
36 }
37
38 nested_exception::nested_exception() _NOEXCEPT
39     : __ptr_(current_exception())
40 {
41 }
42
43 #if !defined(__GLIBCXX__)
44
45 nested_exception::~nested_exception() _NOEXCEPT
46 {
47 }
48
49 #endif
50
51 _LIBCPP_NORETURN
52 void
53 nested_exception::rethrow_nested() const
54 {
55 #  warning exception_ptr not yet implemented
56   fprintf(stderr, "exception_ptr not yet implemented\n");
57   ::abort();
58 #if 0
59   if (__ptr_ == nullptr)
60       terminate();
61   rethrow_exception(__ptr_);
62 #endif // FIXME
63 }
64
65 exception_ptr current_exception() _NOEXCEPT
66 {
67 #  warning exception_ptr not yet implemented
68   fprintf(stderr, "exception_ptr not yet implemented\n");
69   ::abort();
70 }
71
72 _LIBCPP_NORETURN
73 void rethrow_exception(exception_ptr p)
74 {
75 #  warning exception_ptr not yet implemented
76   fprintf(stderr, "exception_ptr not yet implemented\n");
77   ::abort();
78 }
79
80 } // namespace std