blob: 41d65f9414a9fb4921b969d52bd387f51e93bb16 [file] [log] [blame]
Nick Kledzikd1a61bb2010-05-14 20:19:37 +00001//===------------------------ exception.cpp -------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
Howard Hinnantee11c312010-11-16 22:09:02 +00005// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
Nick Kledzikd1a61bb2010-05-14 20:19:37 +00007//
8//===----------------------------------------------------------------------===//
Nick Kledzikd1a61bb2010-05-14 20:19:37 +00009
10#include "exception"
Peter Collingbourne4d7da9a2013-10-06 22:13:21 +000011#include "new"
Nick Kledzikd1a61bb2010-05-14 20:19:37 +000012
Eric Fiselier4e5fccc2017-02-10 04:25:33 +000013#if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI) || \
14 (defined(__APPLE__) && !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY))
Nick Kledzikd1a61bb2010-05-14 20:19:37 +000015 #include <cxxabi.h>
16 using namespace __cxxabiv1;
David Chisnall1d581062011-09-21 08:39:44 +000017 #define HAVE_DEPENDENT_EH_ABI 1
Eric Fiselier4e5fccc2017-02-10 04:25:33 +000018#endif
Nick Kledzikd1a61bb2010-05-14 20:19:37 +000019
Eric Fiselier2391b382017-01-07 10:04:40 +000020#if defined(_LIBCPP_ABI_MICROSOFT)
Eric Fiselier4e5fccc2017-02-10 04:25:33 +000021#include "support/runtime/exception_msvc.ipp"
22#include "support/runtime/exception_pointer_unimplemented.ipp"
23#elif defined(_LIBCPPABI_VERSION)
24#include "support/runtime/exception_libcxxabi.ipp"
25#include "support/runtime/exception_pointer_cxxabi.ipp"
26#elif defined(LIBCXXRT)
27#include "support/runtime/exception_libcxxrt.ipp"
28#include "support/runtime/exception_pointer_cxxabi.ipp"
Peter Collingbourne4d7da9a2013-10-06 22:13:21 +000029#elif defined(__GLIBCXX__)
Eric Fiselier4e5fccc2017-02-10 04:25:33 +000030#include "support/runtime/exception_glibcxx.ipp"
31#include "support/runtime/exception_pointer_glibcxx.ipp"
Nick Kledzikd1a61bb2010-05-14 20:19:37 +000032#else
Eric Fiselier4e5fccc2017-02-10 04:25:33 +000033#include "support/runtime/exception_fallback.ipp"
34#include "support/runtime/exception_pointer_unimplemented.ipp"
Peter Collingbourne4d7da9a2013-10-06 22:13:21 +000035#endif