summaryrefslogtreecommitdiffstats
path: root/libcxx/src/typeinfo.cpp
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/src/typeinfo.cpp
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/src/typeinfo.cpp')
-rw-r--r--libcxx/src/typeinfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/src/typeinfo.cpp b/libcxx/src/typeinfo.cpp
index b49c98273c5..5b893b1e68b 100644
--- a/libcxx/src/typeinfo.cpp
+++ b/libcxx/src/typeinfo.cpp
@@ -8,7 +8,7 @@
#include "typeinfo"
-#if defined(_LIBCPP_ABI_MICROSOFT) && defined(_LIBCPP_NO_VCRUNTIME)
+#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_ABI_VCRUNTIME)
#include <string.h>
int std::type_info::__compare(const type_info &__rhs) const _NOEXCEPT {
@@ -49,7 +49,7 @@ size_t std::type_info::hash_code() const _NOEXCEPT {
// FIXME: Remove the _LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY configuration.
#if (!defined(LIBCXX_BUILDING_LIBCXXABI) && !defined(LIBCXXRT) && \
!defined(__GLIBCXX__) && !defined(__APPLE__) && \
- !(defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME))) || \
+ !defined(_LIBCPP_ABI_VCRUNTIME)) || \
defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY)
std::type_info::~type_info()
{
OpenPOWER on IntegriCloud