Index: libcxx/include/typeinfo =================================================================== --- libcxx/include/typeinfo +++ libcxx/include/typeinfo @@ -69,6 +69,10 @@ #pragma GCC system_header #endif +#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME) +#include +#else + #if !defined(_LIBCPP_ABI_MICROSOFT) #if defined(_LIBCPP_NONUNIQUE_RTTI_BIT) #define _LIBCPP_HAS_NONUNIQUE_TYPEINFO @@ -219,6 +223,8 @@ } // std +#endif // defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME) + _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE void __throw_bad_cast() Index: libcxx/src/support/runtime/exception_msvc.ipp =================================================================== --- libcxx/src/support/runtime/exception_msvc.ipp +++ libcxx/src/support/runtime/exception_msvc.ipp @@ -97,6 +97,7 @@ return "bad_array_length"; } +#if defined(_LIBCPP_NO_VCRUNTIME) bad_cast::bad_cast() _NOEXCEPT { } @@ -125,7 +126,6 @@ return "std::bad_typeid"; } -#if defined(_LIBCPP_NO_VCRUNTIME) exception::~exception() _NOEXCEPT { } Index: libcxx/src/typeinfo.cpp =================================================================== --- libcxx/src/typeinfo.cpp +++ libcxx/src/typeinfo.cpp @@ -9,7 +9,7 @@ #include "typeinfo" -#if defined(_LIBCPP_ABI_MICROSOFT) +#if defined(_LIBCPP_ABI_MICROSOFT) && defined(_LIBCPP_NO_VCRUNTIME) #include int std::type_info::__compare(const type_info &__rhs) const _NOEXCEPT { @@ -49,7 +49,8 @@ // FIXME: Remove __APPLE__ default here once buildit is gone. // FIXME: Remove the _LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY configuration. #if (!defined(LIBCXX_BUILDING_LIBCXXABI) && !defined(LIBCXXRT) && \ - !defined(__GLIBCXX__) && !defined(__APPLE__)) || \ + !defined(__GLIBCXX__) && !defined(__APPLE__) && \ + !(defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME))) || \ defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) std::type_info::~type_info() {