[libcxxabi] r206941 - Fixes incorrect #ifs for SJ/LJ exceptions
Dan Albert
danalbert at google.com
Tue Apr 22 21:45:43 PDT 2014
Author: danalbert
Date: Tue Apr 22 23:45:42 2014
New Revision: 206941
URL: http://llvm.org/viewvc/llvm-project?rev=206941&view=rev
Log:
Fixes incorrect #ifs for SJ/LJ exceptions
The was working because, given __APPLE__, _LIBUNWIND_BUILD_SJLJ_APIS was set to
__arm__, but other ARM targets not using SJ/LJ will fail to compile.
Modified:
libcxxabi/trunk/include/unwind.h
libcxxabi/trunk/src/cxa_exception.cpp
libcxxabi/trunk/src/cxa_personality.cpp
Modified: libcxxabi/trunk/include/unwind.h
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/include/unwind.h?rev=206941&r1=206940&r2=206941&view=diff
==============================================================================
--- libcxxabi/trunk/include/unwind.h (original)
+++ libcxxabi/trunk/include/unwind.h Tue Apr 22 23:45:42 2014
@@ -83,7 +83,7 @@ extern "C" {
//
// The following are the base functions documented by the C++ ABI
//
-#if __arm__
+#if __USING_SJLJ_EXCEPTIONS__
extern _Unwind_Reason_Code
_Unwind_SjLj_RaiseException(struct _Unwind_Exception *exception_object);
extern void _Unwind_SjLj_Resume(struct _Unwind_Exception *exception_object);
Modified: libcxxabi/trunk/src/cxa_exception.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_exception.cpp?rev=206941&r1=206940&r2=206941&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_exception.cpp (original)
+++ libcxxabi/trunk/src/cxa_exception.cpp Tue Apr 22 23:45:42 2014
@@ -232,7 +232,7 @@ __cxa_throw(void* thrown_object, std::ty
globals->uncaughtExceptions += 1; // Not atomically, since globals are thread-local
exception_header->unwindHeader.exception_cleanup = exception_cleanup_func;
-#if __arm__
+#if __USING_SJLJ_EXCEPTIONS__
_Unwind_SjLj_RaiseException(&exception_header->unwindHeader);
#else
_Unwind_RaiseException(&exception_header->unwindHeader);
@@ -465,7 +465,7 @@ __cxa_rethrow()
// nothing
globals->caughtExceptions = 0;
}
-#if __arm__
+#if __USING_SJLJ_EXCEPTIONS__
_Unwind_SjLj_RaiseException(&exception_header->unwindHeader);
#else
_Unwind_RaiseException(&exception_header->unwindHeader);
@@ -594,7 +594,7 @@ __cxa_rethrow_primary_exception(void* th
setDependentExceptionClass(&dep_exception_header->unwindHeader);
__cxa_get_globals()->uncaughtExceptions += 1;
dep_exception_header->unwindHeader.exception_cleanup = dependent_exception_cleanup;
-#if __arm__
+#if __USING_SJLJ_EXCEPTIONS__
_Unwind_SjLj_RaiseException(&dep_exception_header->unwindHeader);
#else
_Unwind_RaiseException(&dep_exception_header->unwindHeader);
Modified: libcxxabi/trunk/src/cxa_personality.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_personality.cpp?rev=206941&r1=206940&r2=206941&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_personality.cpp (original)
+++ libcxxabi/trunk/src/cxa_personality.cpp Tue Apr 22 23:45:42 2014
@@ -838,7 +838,7 @@ _UA_CLEANUP_PHASE
*/
_Unwind_Reason_Code
-#if __arm__
+#if __USING_SJLJ_EXCEPTIONS__
__gxx_personality_sj0
#else
__gxx_personality_v0
More information about the cfe-commits
mailing list