diff options
author | Howard Hinnant <hhinnant@apple.com> | 2013-03-28 18:56:26 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2013-03-28 18:56:26 +0000 |
commit | db4d478ff421cd1b1be254264367ceceebf39481 (patch) | |
tree | e6cd36706ee86205c158350ed4ddbb7db122db2f /src/typeinfo.cpp | |
parent | 742fecbd2afe38cb7a95eb697ecb0ce5982562e2 (diff) | |
download | libcxx-db4d478ff421cd1b1be254264367ceceebf39481.tar.gz |
Fix a few warnings/errors for compiling with -fno-exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178267 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src/typeinfo.cpp')
-rw-r--r-- | src/typeinfo.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/typeinfo.cpp b/src/typeinfo.cpp index 7b47d7412..60828944a 100644 --- a/src/typeinfo.cpp +++ b/src/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 |