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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@323491 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Peter Collingbourne
2018-01-26 01:22:17 +00:00
parent 6b5c08ab34
commit 2b64fcb946
3 changed files with 10 additions and 3 deletions

View File

@@ -97,6 +97,7 @@ bad_array_length::what() const _NOEXCEPT
return "bad_array_length";
}
#if defined(_LIBCPP_NO_VCRUNTIME)
bad_cast::bad_cast() _NOEXCEPT
{
}
@@ -125,7 +126,6 @@ bad_typeid::what() const _NOEXCEPT
return "std::bad_typeid";
}
#if defined(_LIBCPP_NO_VCRUNTIME)
exception::~exception() _NOEXCEPT
{
}