[compiler-rt] 03c19f4 - [builtins] Check __SEH__, when checking if ARM EHABI is implied

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 6 13:28:05 PDT 2022


Author: Martin Storsjö
Date: 2022-06-06T23:23:08+03:00
New Revision: 03c19f41a26a8007b6c994eea3b3c308562e6d59

URL: https://github.com/llvm/llvm-project/commit/03c19f41a26a8007b6c994eea3b3c308562e6d59
DIFF: https://github.com/llvm/llvm-project/commit/03c19f41a26a8007b6c994eea3b3c308562e6d59.diff

LOG: [builtins] Check __SEH__, when checking if ARM EHABI is implied

ARM EHABI isn't signalled by any specific compiler builtin define,
but is implied by the lack of defines specifying any other
exception handling mechanism, `__USING_SJLJ_EXCEPTIONS__` or
`__ARM_DWARF_EH__`.

As Windows SEH also can be used for unwinding, check for the
`__SEH__` define too, in the same way.

This is the same change as 4a3722a2c3dff1fe885cc38bf43d3c095c9851e7 /
D126866, applied on the compiler-rt builtins gcc_personality_v0
function.

Differential Revision: https://reviews.llvm.org/D126863

Added: 
    

Modified: 
    compiler-rt/lib/builtins/gcc_personality_v0.c

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/builtins/gcc_personality_v0.c b/compiler-rt/lib/builtins/gcc_personality_v0.c
index afb9e2e113def..58fd7ceb58c35 100644
--- a/compiler-rt/lib/builtins/gcc_personality_v0.c
+++ b/compiler-rt/lib/builtins/gcc_personality_v0.c
@@ -143,7 +143,7 @@ static uintptr_t readEncodedPointer(const uint8_t **data, uint8_t encoding) {
 }
 
 #if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) &&                 \
-    !defined(__ARM_DWARF_EH__)
+    !defined(__ARM_DWARF_EH__) && !defined(__SEH__)
 #define USING_ARM_EHABI 1
 _Unwind_Reason_Code __gnu_unwind_frame(struct _Unwind_Exception *,
                                        struct _Unwind_Context *);


        


More information about the llvm-commits mailing list