1 //===------------------------ exception.cpp -------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "exception"
10 #include "new"
11 #include "typeinfo"
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_msvc.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 "include/atomic_support.h"
34 #include "support/runtime/exception_fallback.ipp"
35 #include "support/runtime/exception_pointer_unimplemented.ipp"
36 #endif
37