[PATCH] D53127: Fix declaration of _URC_FATAL_PHASE1_ERROR in libc++abi when compiled with gcc (follow-up of D42242)
Steffen Kuhn via Phabricator
reviews at reviews.llvm.org
Sat Oct 13 01:45:10 PDT 2018
stefson updated this revision to Diff 169553.
stefson added a comment.
Still not really sure wether `(__ARM_EABI_UNWINDER__)` is better or not.
Any feedback?
Repository:
rCXXA libc++abi
https://reviews.llvm.org/D53127
Files:
src/cxa_exception.hpp
src/cxa_personality.cpp
Index: src/cxa_personality.cpp
===================================================================
--- src/cxa_personality.cpp
+++ src/cxa_personality.cpp
@@ -1109,7 +1109,7 @@
// Check the undocumented force unwinding behavior
bool is_force_unwinding = state & _US_FORCE_UNWIND;
- state &= ~_US_FORCE_UNWIND;
+ state = (_Unwind_State)(state & ~_US_FORCE_UNWIND);
scan_results results;
switch (state) {
Index: src/cxa_exception.hpp
===================================================================
--- src/cxa_exception.hpp
+++ src/cxa_exception.hpp
@@ -28,6 +28,13 @@
void __setExceptionClass ( _Unwind_Exception*, uint64_t);
bool __isOurExceptionClass(const _Unwind_Exception*);
+#if defined(__arm__) && defined(__ARM_EABI_UNWINDER__)
+// missing values from _Unwind_Reason_Code enum
+#define _URC_FATAL_PHASE2_ERROR ((_Unwind_Reason_Code)2)
+#define _URC_FATAL_PHASE1_ERROR ((_Unwind_Reason_Code)3)
+#define _URC_NORMAL_STOP ((_Unwind_Reason_Code)4)
+#endif
+
struct _LIBCXXABI_HIDDEN __cxa_exception {
#if defined(__LP64__) || defined(_LIBCXXABI_ARM_EHABI)
// This is a new field to support C++ 0x exception_ptr.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53127.169553.patch
Type: text/x-patch
Size: 1174 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20181013/94bbf7b4/attachment.bin>
More information about the libcxx-commits
mailing list