[cfe-commits] [libcxxabi] r149513 - /libcxxabi/trunk/src/cxa_personality.cpp

Howard Hinnant hhinnant at apple.com
Wed Feb 1 08:16:11 PST 2012


Author: hhinnant
Date: Wed Feb  1 10:16:11 2012
New Revision: 149513

URL: http://llvm.org/viewvc/llvm-project?rev=149513&view=rev
Log:
Move an error detector to a better place.

Modified:
    libcxxabi/trunk/src/cxa_personality.cpp

Modified: libcxxabi/trunk/src/cxa_personality.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_personality.cpp?rev=149513&r1=149512&r2=149513&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_personality.cpp (original)
+++ libcxxabi/trunk/src/cxa_personality.cpp Wed Feb  1 10:16:11 2012
@@ -709,11 +709,6 @@
                 if (actionOffset == 0)
                 {
                     // End of action list, no matching handler or cleanup found
-                    // If this is a type 2 search, phase 1 told us we would find
-                    //   a handler and we didn't.  Something has gone terribly wrong.
-                    // Searches type 1 and 3 should return _URC_CONTINUE_UNWIND
-                    if (actions & _UA_HANDLER_FRAME)
-                        call_terminate(native_exception, unwind_exception);
                     results.reason = _URC_CONTINUE_UNWIND;
                     return;
                 }
@@ -829,6 +824,8 @@
             else
             {
                 scan_eh_tab(results, actions, native_exception, unwind_exception, context);
+                if (results.reason != _URC_HANDLER_FOUND)
+                    call_terminate(native_exception, unwind_exception);
             }
             _Unwind_SetGR(context, __builtin_eh_return_data_regno(0), (uintptr_t)unwind_exception);
             _Unwind_SetGR(context, __builtin_eh_return_data_regno(1), results.ttypeIndex);





More information about the cfe-commits mailing list