xref: /aosp_15_r20/external/libcxx/src/exception.cpp (revision 58b9f456b02922dfdb1fad8a988d5fd8765ecb80)
1*58b9f456SAndroid Build Coastguard Worker //===------------------------ exception.cpp -------------------------------===//
2*58b9f456SAndroid Build Coastguard Worker //
3*58b9f456SAndroid Build Coastguard Worker //                     The LLVM Compiler Infrastructure
4*58b9f456SAndroid Build Coastguard Worker //
5*58b9f456SAndroid Build Coastguard Worker // This file is dual licensed under the MIT and the University of Illinois Open
6*58b9f456SAndroid Build Coastguard Worker // Source Licenses. See LICENSE.TXT for details.
7*58b9f456SAndroid Build Coastguard Worker //
8*58b9f456SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===//
9*58b9f456SAndroid Build Coastguard Worker 
10*58b9f456SAndroid Build Coastguard Worker #include "exception"
11*58b9f456SAndroid Build Coastguard Worker #include "new"
12*58b9f456SAndroid Build Coastguard Worker #include "typeinfo"
13*58b9f456SAndroid Build Coastguard Worker 
14*58b9f456SAndroid Build Coastguard Worker #if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI) || \
15*58b9f456SAndroid Build Coastguard Worker   (defined(__APPLE__) && !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY))
16*58b9f456SAndroid Build Coastguard Worker   #include <cxxabi.h>
17*58b9f456SAndroid Build Coastguard Worker   using namespace __cxxabiv1;
18*58b9f456SAndroid Build Coastguard Worker   #define HAVE_DEPENDENT_EH_ABI 1
19*58b9f456SAndroid Build Coastguard Worker #endif
20*58b9f456SAndroid Build Coastguard Worker 
21*58b9f456SAndroid Build Coastguard Worker #if defined(_LIBCPP_ABI_MICROSOFT)
22*58b9f456SAndroid Build Coastguard Worker #include "support/runtime/exception_msvc.ipp"
23*58b9f456SAndroid Build Coastguard Worker #include "support/runtime/exception_pointer_msvc.ipp"
24*58b9f456SAndroid Build Coastguard Worker #elif defined(_LIBCPPABI_VERSION)
25*58b9f456SAndroid Build Coastguard Worker #include "support/runtime/exception_libcxxabi.ipp"
26*58b9f456SAndroid Build Coastguard Worker #include "support/runtime/exception_pointer_cxxabi.ipp"
27*58b9f456SAndroid Build Coastguard Worker #elif defined(LIBCXXRT)
28*58b9f456SAndroid Build Coastguard Worker #include "support/runtime/exception_libcxxrt.ipp"
29*58b9f456SAndroid Build Coastguard Worker #include "support/runtime/exception_pointer_cxxabi.ipp"
30*58b9f456SAndroid Build Coastguard Worker #elif defined(__GLIBCXX__)
31*58b9f456SAndroid Build Coastguard Worker #include "support/runtime/exception_glibcxx.ipp"
32*58b9f456SAndroid Build Coastguard Worker #include "support/runtime/exception_pointer_glibcxx.ipp"
33*58b9f456SAndroid Build Coastguard Worker #else
34*58b9f456SAndroid Build Coastguard Worker #include "include/atomic_support.h"
35*58b9f456SAndroid Build Coastguard Worker #include "support/runtime/exception_fallback.ipp"
36*58b9f456SAndroid Build Coastguard Worker #include "support/runtime/exception_pointer_unimplemented.ipp"
37*58b9f456SAndroid Build Coastguard Worker #endif
38