mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 18:38:30 +08:00
[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 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@315234 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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) \
|
||||
|
Reference in New Issue
Block a user