diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:03:23 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:03:23 +0000 |
| commit | 0dc0969cd0a732760f0aa79942a04e0eaef297c4 (patch) | |
| tree | 051bdb57b1ac6ee143f61ddbb47bd0da619f6f0c /src/typeinfo.cpp | |
| parent | 868847c6900e575417c03bced6e562b3af891318 (diff) | |
Notes
Diffstat (limited to 'src/typeinfo.cpp')
| -rw-r--r-- | src/typeinfo.cpp | 68 |
1 files changed, 5 insertions, 63 deletions
diff --git a/src/typeinfo.cpp b/src/typeinfo.cpp index d0a7dae38025..02778f368704 100644 --- a/src/typeinfo.cpp +++ b/src/typeinfo.cpp @@ -6,73 +6,15 @@ // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -#include <stdlib.h> - -#if !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) && \ - (defined(__APPLE__) || defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI)) -#include <cxxabi.h> -#endif #include "typeinfo" -#if defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) +// FIXME: Remove __APPLE__ default here once buildit is gone. +#if (!defined(_LIBCPP_ABI_MICROSOFT) && !defined(LIBCXX_BUILDING_LIBCXXABI) && \ + !defined(LIBCXXRT) && !defined(__GLIBCXX__) && \ + !defined(__APPLE__)) || \ + defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) // FIXME: remove this configuration. std::type_info::~type_info() { } #endif - -#if !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION) - -std::bad_cast::bad_cast() _NOEXCEPT -{ -} - -std::bad_typeid::bad_typeid() _NOEXCEPT -{ -} - -#ifndef __GLIBCXX__ - -std::bad_cast::~bad_cast() _NOEXCEPT -{ -} - -const char* -std::bad_cast::what() const _NOEXCEPT -{ - return "std::bad_cast"; -} - -std::bad_typeid::~bad_typeid() _NOEXCEPT -{ -} - -const char* -std::bad_typeid::what() const _NOEXCEPT -{ - return "std::bad_typeid"; -} - -#if defined(__APPLE__) && !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) - // On Darwin, the cxa_bad_* functions cannot be in the lower level library - // because bad_cast and bad_typeid are defined in his higher level library - void __cxxabiv1::__cxa_bad_typeid() - { -#ifndef _LIBCPP_NO_EXCEPTIONS - throw std::bad_typeid(); -#else - _VSTD::abort(); -#endif - } - void __cxxabiv1::__cxa_bad_cast() - { -#ifndef _LIBCPP_NO_EXCEPTIONS - throw std::bad_cast(); -#else - _VSTD::abort(); -#endif - } -#endif - -#endif // !__GLIBCXX__ -#endif // !LIBCXXRT && !_LIBCPPABI_VERSION |
