bcraig added inline comments. ================ Comment at: src/cxa_aux_runtime.cpp:19-24 @@ -18,4 +18,8 @@ extern "C" { _LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void __cxa_bad_cast(void) { +#ifndef _LIBCXXABI_NO_EXCEPTIONS throw std::bad_cast(); +#else + std::terminate(); +#endif } ---------------- bcraig wrote: > So you're turning off exceptions, but leaving RTTI? You might want to keep > some of the RTTI tests around too if that's the case. _cxa_bad_cast should be inserted by the compiler. It is called when a dynamic_cast to a reference type fails. _cxa_bad_typeid should be inserted by the compiler. It is called when typeid is used on a null pointer.
_cxa_throw_bad_array_new_length should probably stay put. The most common reason for that to get hit is if sizeof(obj) * number_of_elts > SIZE_T_MAX. http://reviews.llvm.org/D20677 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits