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