xref: /freebsd/contrib/llvm-project/libcxx/src/exception.cpp (revision 0b57cec536236d46e3dba9bd041533462f33dbb7)
1*0b57cec5SDimitry Andric //===------------------------ exception.cpp -------------------------------===//
2*0b57cec5SDimitry Andric //
3*0b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*0b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*0b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*0b57cec5SDimitry Andric //
7*0b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
8*0b57cec5SDimitry Andric 
9*0b57cec5SDimitry Andric #include "exception"
10*0b57cec5SDimitry Andric #include "new"
11*0b57cec5SDimitry Andric #include "typeinfo"
12*0b57cec5SDimitry Andric 
13*0b57cec5SDimitry Andric #if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI)
14*0b57cec5SDimitry Andric   #include <cxxabi.h>
15*0b57cec5SDimitry Andric   using namespace __cxxabiv1;
16*0b57cec5SDimitry Andric   #define HAVE_DEPENDENT_EH_ABI 1
17*0b57cec5SDimitry Andric #endif
18*0b57cec5SDimitry Andric 
19*0b57cec5SDimitry Andric #if defined(_LIBCPP_ABI_MICROSOFT)
20*0b57cec5SDimitry Andric #include "support/runtime/exception_msvc.ipp"
21*0b57cec5SDimitry Andric #include "support/runtime/exception_pointer_msvc.ipp"
22*0b57cec5SDimitry Andric #elif defined(_LIBCPPABI_VERSION)
23*0b57cec5SDimitry Andric #include "support/runtime/exception_libcxxabi.ipp"
24*0b57cec5SDimitry Andric #include "support/runtime/exception_pointer_cxxabi.ipp"
25*0b57cec5SDimitry Andric #elif defined(LIBCXXRT)
26*0b57cec5SDimitry Andric #include "support/runtime/exception_libcxxrt.ipp"
27*0b57cec5SDimitry Andric #include "support/runtime/exception_pointer_cxxabi.ipp"
28*0b57cec5SDimitry Andric #elif defined(__GLIBCXX__)
29*0b57cec5SDimitry Andric #include "support/runtime/exception_glibcxx.ipp"
30*0b57cec5SDimitry Andric #include "support/runtime/exception_pointer_glibcxx.ipp"
31*0b57cec5SDimitry Andric #else
32*0b57cec5SDimitry Andric #include "include/atomic_support.h"
33*0b57cec5SDimitry Andric #include "support/runtime/exception_fallback.ipp"
34*0b57cec5SDimitry Andric #include "support/runtime/exception_pointer_unimplemented.ipp"
35*0b57cec5SDimitry Andric #endif
36