1 //===------------------------- typeinfo.cpp -------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 #if !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) && \
12 (defined(__APPLE__) || defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI))
18 #if defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY)
19 std::type_info::~type_info()
24 #if !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION)
26 std::bad_cast::bad_cast() _NOEXCEPT
30 std::bad_typeid::bad_typeid() _NOEXCEPT
36 std::bad_cast::~bad_cast() _NOEXCEPT
41 std::bad_cast::what() const _NOEXCEPT
43 return "std::bad_cast";
46 std::bad_typeid::~bad_typeid() _NOEXCEPT
51 std::bad_typeid::what() const _NOEXCEPT
53 return "std::bad_typeid";
56 #if defined(__APPLE__) && !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY)
57 // On Darwin, the cxa_bad_* functions cannot be in the lower level library
58 // because bad_cast and bad_typeid are defined in his higher level library
59 void __cxxabiv1::__cxa_bad_typeid()
61 #ifndef _LIBCPP_NO_EXCEPTIONS
62 throw std::bad_typeid();
67 void __cxxabiv1::__cxa_bad_cast()
69 #ifndef _LIBCPP_NO_EXCEPTIONS
70 throw std::bad_cast();
77 #endif // !__GLIBCXX__
78 #endif // !LIBCXXRT && !_LIBCPPABI_VERSION