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 //===----------------------------------------------------------------------===// 8 9 #define _LIBCPP_ENABLE_CXX20_REMOVED_UNCAUGHT_EXCEPTION 10 #define _LIBCPP_DISABLE_DEPRECATION_WARNINGS 11 12 #include <exception> 13 #include <new> 14 #include <typeinfo> 15 16 #if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI) 17 # include <cxxabi.h> 18 using namespace __cxxabiv1; 19 # define HAVE_DEPENDENT_EH_ABI 1 20 #endif 21 22 #if defined(_LIBCPP_ABI_MICROSOFT) 23 # include "support/runtime/exception_msvc.ipp" 24 # include "support/runtime/exception_pointer_msvc.ipp" 25 #elif defined(_LIBCPPABI_VERSION) 26 # include "support/runtime/exception_libcxxabi.ipp" 27 # include "support/runtime/exception_pointer_cxxabi.ipp" 28 #elif defined(LIBCXXRT) 29 # include "support/runtime/exception_libcxxrt.ipp" 30 # include "support/runtime/exception_pointer_cxxabi.ipp" 31 #elif defined(__GLIBCXX__) 32 # include "support/runtime/exception_glibcxx.ipp" 33 # include "support/runtime/exception_pointer_glibcxx.ipp" 34 #else 35 # include "include/atomic_support.h" 36 # include "support/runtime/exception_fallback.ipp" 37 # include "support/runtime/exception_pointer_unimplemented.ipp" 38 #endif 39