exception.cpp revision 327952
1//===------------------------ exception.cpp -------------------------------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "exception"
11#include "new"
12#include "typeinfo"
13
14#if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI) || \
15  (defined(__APPLE__) && !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY))
16  #include <cxxabi.h>
17  using namespace __cxxabiv1;
18  #define HAVE_DEPENDENT_EH_ABI 1
19#endif
20
21#if defined(_LIBCPP_ABI_MICROSOFT)
22#include "support/runtime/exception_msvc.ipp"
23#include "support/runtime/exception_pointer_msvc.ipp"
24#elif defined(_LIBCPPABI_VERSION)
25#include "support/runtime/exception_libcxxabi.ipp"
26#include "support/runtime/exception_pointer_cxxabi.ipp"
27#elif defined(LIBCXXRT)
28#include "support/runtime/exception_libcxxrt.ipp"
29#include "support/runtime/exception_pointer_cxxabi.ipp"
30#elif defined(__GLIBCXX__)
31#include "support/runtime/exception_glibcxx.ipp"
32#include "support/runtime/exception_pointer_glibcxx.ipp"
33#else
34#include "include/atomic_support.h"
35#include "support/runtime/exception_fallback.ipp"
36#include "support/runtime/exception_pointer_unimplemented.ipp"
37#endif
38