diff options
Diffstat (limited to 'system/lib/libcxx/typeinfo.cpp')
-rw-r--r-- | system/lib/libcxx/typeinfo.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/system/lib/libcxx/typeinfo.cpp b/system/lib/libcxx/typeinfo.cpp index 7b47d741..60828944 100644 --- a/system/lib/libcxx/typeinfo.cpp +++ b/system/lib/libcxx/typeinfo.cpp @@ -53,8 +53,18 @@ std::bad_typeid::what() const _NOEXCEPT #ifdef __APPLE__ // 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() { throw std::bad_typeid(); } - void __cxxabiv1::__cxa_bad_cast() { throw std::bad_cast(); } + void __cxxabiv1::__cxa_bad_typeid() + { +#ifndef _LIBCPP_NO_EXCEPTIONS + throw std::bad_typeid(); +#endif + } + void __cxxabiv1::__cxa_bad_cast() + { +#ifndef _LIBCPP_NO_EXCEPTIONS + throw std::bad_cast(); +#endif + } #endif #endif // _LIBCPPABI_VERSION |