diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2018-01-26 01:22:17 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2018-01-26 01:22:17 +0000 |
| commit | 1634c15e3c7e57bf95bb2bab7f5ea6a8a353d7c8 (patch) | |
| tree | 39f515d0864dd8293668356310632516d64ce08a /libcxx/include | |
| parent | 0aa71a4f86b933e728b9bc02c409e4b21f671502 (diff) | |
| download | bcm5719-llvm-1634c15e3c7e57bf95bb2bab7f5ea6a8a353d7c8.tar.gz bcm5719-llvm-1634c15e3c7e57bf95bb2bab7f5ea6a8a353d7c8.zip | |
libcxx: Use vcruntime declarations for typeinfo on Windows.
We need to use the vcruntime declarations on Windows to avoid an
ODR violation involving rtti.obj, which provides the definition of
the runtime function implementing dynamic_cast and depends on the
vcruntime implementations of bad_cast and bad_typeid.
Differential Revision: https://reviews.llvm.org/D42220
llvm-svn: 323491
Diffstat (limited to 'libcxx/include')
| -rw-r--r-- | libcxx/include/typeinfo | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libcxx/include/typeinfo b/libcxx/include/typeinfo index 7e8d3990ed9..74d94e9e397 100644 --- a/libcxx/include/typeinfo +++ b/libcxx/include/typeinfo @@ -69,6 +69,10 @@ public: #pragma GCC system_header #endif +#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME) +#include <vcruntime_typeinfo.h> +#else + #if !defined(_LIBCPP_ABI_MICROSOFT) #if defined(_LIBCPP_NONUNIQUE_RTTI_BIT) #define _LIBCPP_HAS_NONUNIQUE_TYPEINFO @@ -219,6 +223,8 @@ public: } // std +#endif // defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME) + _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE void __throw_bad_cast() |

