summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-02-01 16:16:11 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-02-01 16:16:11 +0000
commit4ca103d14c29045a298e172a7e1f01f10dde124d (patch)
tree89f990525384d54e2ee9f3604716d42dfecac44c
parent2235e6da8fc41cdd172b8654210dffb07f87c23b (diff)
downloadbcm5719-llvm-4ca103d14c29045a298e172a7e1f01f10dde124d.tar.gz
bcm5719-llvm-4ca103d14c29045a298e172a7e1f01f10dde124d.zip
Move an error detector to a better place.
llvm-svn: 149513
-rw-r--r--libcxxabi/src/cxa_personality.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/libcxxabi/src/cxa_personality.cpp b/libcxxabi/src/cxa_personality.cpp
index ec033ab83b3..be2573bacbf 100644
--- a/libcxxabi/src/cxa_personality.cpp
+++ b/libcxxabi/src/cxa_personality.cpp
@@ -709,11 +709,6 @@ scan_eh_tab(scan_results& results, _Unwind_Action actions, bool native_exception
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 @@ __gxx_personality_v0(int version, _Unwind_Action actions, uint64_t exceptionClas
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);
OpenPOWER on IntegriCloud