xref: /freebsd/contrib/llvm-project/libcxx/src/exception.cpp (revision 349cc55c9796c4596a5b9904cd3281af295f878f)
1*349cc55cSDimitry Andric //===----------------------------------------------------------------------===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric 
90b57cec5SDimitry Andric #include "exception"
100b57cec5SDimitry Andric #include "new"
110b57cec5SDimitry Andric #include "typeinfo"
120b57cec5SDimitry Andric 
130b57cec5SDimitry Andric #if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI)
140b57cec5SDimitry Andric   #include <cxxabi.h>
150b57cec5SDimitry Andric   using namespace __cxxabiv1;
160b57cec5SDimitry Andric   #define HAVE_DEPENDENT_EH_ABI 1
170b57cec5SDimitry Andric #endif
180b57cec5SDimitry Andric 
190b57cec5SDimitry Andric #if defined(_LIBCPP_ABI_MICROSOFT)
200b57cec5SDimitry Andric #include "support/runtime/exception_msvc.ipp"
210b57cec5SDimitry Andric #include "support/runtime/exception_pointer_msvc.ipp"
220b57cec5SDimitry Andric #elif defined(_LIBCPPABI_VERSION)
230b57cec5SDimitry Andric #include "support/runtime/exception_libcxxabi.ipp"
240b57cec5SDimitry Andric #include "support/runtime/exception_pointer_cxxabi.ipp"
250b57cec5SDimitry Andric #elif defined(LIBCXXRT)
260b57cec5SDimitry Andric #include "support/runtime/exception_libcxxrt.ipp"
270b57cec5SDimitry Andric #include "support/runtime/exception_pointer_cxxabi.ipp"
280b57cec5SDimitry Andric #elif defined(__GLIBCXX__)
290b57cec5SDimitry Andric #include "support/runtime/exception_glibcxx.ipp"
300b57cec5SDimitry Andric #include "support/runtime/exception_pointer_glibcxx.ipp"
310b57cec5SDimitry Andric #else
320b57cec5SDimitry Andric #include "include/atomic_support.h"
330b57cec5SDimitry Andric #include "support/runtime/exception_fallback.ipp"
340b57cec5SDimitry Andric #include "support/runtime/exception_pointer_unimplemented.ipp"
350b57cec5SDimitry Andric #endif
36