diff options
author | Shoaib Meenai <smeenai@fb.com> | 2017-10-09 19:25:17 +0000 |
---|---|---|
committer | Shoaib Meenai <smeenai@fb.com> | 2017-10-09 19:25:17 +0000 |
commit | 492d7134f3bdd76415d8e7b20a4f1c9a42b85e44 (patch) | |
tree | 27a915541601915c1d3750813fb945ad776f5f6c /libcxx/include/exception | |
parent | 6ab4d075ff40675af20ffc4124d1dc03609518fe (diff) | |
download | bcm5719-llvm-492d7134f3bdd76415d8e7b20a4f1c9a42b85e44.tar.gz bcm5719-llvm-492d7134f3bdd76415d8e7b20a4f1c9a42b85e44.zip |
[libc++] Support Microsoft ABI without vcruntime headers
The vcruntime headers are hairy and clash with both libc++ headers
themselves and other libraries. libc++ normally deals with the clashes
by deferring to the vcruntime headers and silencing its own definitions,
but for clients which don't want to depend on vcruntime headers, it's
desirable to support the opposite, i.e. have libc++ provide its own
definitions.
Certain operator new/delete replacement scenarios are not currently
supported in this mode, which requires some tests to be marked XFAIL.
The added documentation has more details.
Differential Revision: https://reviews.llvm.org/D38522
llvm-svn: 315234
Diffstat (limited to 'libcxx/include/exception')
-rw-r--r-- | libcxx/include/exception | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/include/exception b/libcxx/include/exception index ca2eaf5c6a0..79bd6ac2ae3 100644 --- a/libcxx/include/exception +++ b/libcxx/include/exception @@ -82,7 +82,7 @@ template <class E> void rethrow_if_nested(const E& e); #include <cstdlib> #include <type_traits> -#if defined(_LIBCPP_ABI_MICROSOFT) +#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME) #include <vcruntime_exception.h> #endif @@ -93,7 +93,7 @@ template <class E> void rethrow_if_nested(const E& e); namespace std // purposefully not using versioning namespace { -#if !defined(_LIBCPP_ABI_MICROSOFT) +#if !defined(_LIBCPP_ABI_MICROSOFT) || defined(_LIBCPP_NO_VCRUNTIME) class _LIBCPP_EXCEPTION_ABI exception { public: @@ -110,7 +110,7 @@ public: virtual ~bad_exception() _NOEXCEPT; virtual const char* what() const _NOEXCEPT; }; -#endif // !_LIBCPP_ABI_MICROSOFT +#endif // !_LIBCPP_ABI_MICROSOFT || _LIBCPP_NO_VCRUNTIME #if _LIBCPP_STD_VER <= 14 \ || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS) \ |