Vendor import of llvm-project branch release/19.x llvmorg-19.1.1-0-gd401987fe349...
[freebsd/src.git] / libcxx / src / exception.cpp
blobddb186bf8048fe2298c36b536faeeba004193c46
1 //===----------------------------------------------------------------------===//
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 //===----------------------------------------------------------------------===//
9 #include <exception>
10 #include <new>
11 #include <typeinfo>
13 #if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI)
14 # include <cxxabi.h>
15 using namespace __cxxabiv1;
16 # define HAVE_DEPENDENT_EH_ABI 1
17 #endif
19 #if defined(_LIBCPP_ABI_MICROSOFT)
20 # include "support/runtime/exception_msvc.ipp"
21 # include "support/runtime/exception_pointer_msvc.ipp"
22 #elif defined(_LIBCPPABI_VERSION)
23 # include "support/runtime/exception_libcxxabi.ipp"
24 # include "support/runtime/exception_pointer_cxxabi.ipp"
25 #elif defined(LIBCXXRT)
26 # include "support/runtime/exception_libcxxrt.ipp"
27 # include "support/runtime/exception_pointer_cxxabi.ipp"
28 #elif defined(__GLIBCXX__)
29 # include "support/runtime/exception_glibcxx.ipp"
30 # include "support/runtime/exception_pointer_glibcxx.ipp"
31 #else
32 # include "include/atomic_support.h"
33 # include "support/runtime/exception_fallback.ipp"
34 # include "support/runtime/exception_pointer_unimplemented.ipp"
35 #endif