summaryrefslogtreecommitdiffstats
path: root/libcxx/include/exception
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2019-03-05 01:57:01 +0000
committerEric Fiselier <eric@efcs.ca>2019-03-05 01:57:01 +0000
commite69290dc7ff7319acf5904f15ab6630fad07ab58 (patch)
tree35b89875fe5bc992c80f093fbaa91547aa06f9af /libcxx/include/exception
parent3fd4a968ad80d603ea4dbd616c00824cf165e384 (diff)
downloadbcm5719-llvm-e69290dc7ff7319acf5904f15ab6630fad07ab58.tar.gz
bcm5719-llvm-e69290dc7ff7319acf5904f15ab6630fad07ab58.zip
Make VCRuntime ABI configuration a first-class option.
Summary: On Windows we currently provide two separate ABI configurations. One which defers to `vcruntime` to provide the C++ runtime and another which doesn't. Using `vcruntime` allows interoperability which programs compiled against the MSVC STL, and should be preferred whenever possible. When deferring to `vcruntime` much of the ABI we provide changes. Including the layout of `<stdexcept>` types, their vtables, and how the linkage of their members. This patch introduces the `_LIBCPP_ABI_VCRUNTIME` macro to denote this configuration. It also cleans up the existing configuration for using `vcruntime`. This cleanup lays the groundwork for fixing a number of ABI and interoperability bugs in `<stdexcept>`. Reviewers: thomasanderson, ldionne, smeenai Reviewed By: smeenai Subscribers: jdoerfert, libcxx-commits, #libc Differential Revision: https://reviews.llvm.org/D58942 llvm-svn: 355366
Diffstat (limited to 'libcxx/include/exception')
-rw-r--r--libcxx/include/exception6
1 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/include/exception b/libcxx/include/exception
index 63d8ad229c2..05ff6015075 100644
--- a/libcxx/include/exception
+++ b/libcxx/include/exception
@@ -82,7 +82,7 @@ template <class E> void rethrow_if_nested(const E& e);
#include <type_traits>
#include <version>
-#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME)
+#if defined(_LIBCPP_ABI_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) || defined(_LIBCPP_NO_VCRUNTIME)
+#if !defined(_LIBCPP_ABI_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 || _LIBCPP_NO_VCRUNTIME
+#endif // !_LIBCPP_ABI_VCRUNTIME
#if _LIBCPP_STD_VER <= 14 \
|| defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS) \
OpenPOWER on IntegriCloud