diff options
author | Howard Hinnant <hhinnant@apple.com> | 2012-02-01 22:15:15 +0400 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2012-02-01 22:15:15 +0400 |
commit | 8aa78517ab3dff4faeff521bdca94c40419fa204 (patch) | |
tree | 941b08c88274461006bf248e6ab3e9aeb225b776 /libcxxabi/src/cxa_handlers.cpp | |
parent | 6b8ef34f8483dc8ada88d7c35abf9e280d35e584 (diff) |
Treat all exceptions except that the ones that this library throws as foreign. Even other C++ exceptions.
llvm-svn: 149518
Diffstat (limited to 'libcxxabi/src/cxa_handlers.cpp')
-rw-r--r-- | libcxxabi/src/cxa_handlers.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libcxxabi/src/cxa_handlers.cpp b/libcxxabi/src/cxa_handlers.cpp index 015a06e223d2..be43181c9e7f 100644 --- a/libcxxabi/src/cxa_handlers.cpp +++ b/libcxxabi/src/cxa_handlers.cpp @@ -37,8 +37,9 @@ static void default_terminate_handler() { _Unwind_Exception* unwind_exception = reinterpret_cast<_Unwind_Exception*>(exception_header + 1) - 1; - bool native_exception = (unwind_exception->exception_class & get_language) == - (kOurExceptionClass & get_language); + bool native_exception = + (unwind_exception->exception_class & get_vendor_and_language) == + (kOurExceptionClass & get_vendor_and_language); if (native_exception) { void* thrown_object = @@ -167,8 +168,9 @@ terminate() _NOEXCEPT { _Unwind_Exception* unwind_exception = reinterpret_cast<_Unwind_Exception*>(exception_header + 1) - 1; - bool native_exception = (unwind_exception->exception_class & get_language) == - (kOurExceptionClass & get_language); + bool native_exception = + (unwind_exception->exception_class & get_vendor_and_language) == + (kOurExceptionClass & get_vendor_and_language); if (native_exception) { __cxa_exception* exception_header = (__cxa_exception*)(unwind_exception+1) - 1; |