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