[libcxx-commits] [libcxxabi] 4a3722a - [libcxxabi] Check __SEH__, when checking if ARM EHABI is implied

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 6 13:19:35 PDT 2022


Author: Martin Storsjö
Date: 2022-06-06T23:19:22+03:00
New Revision: 4a3722a2c3dff1fe885cc38bf43d3c095c9851e7

URL: https://github.com/llvm/llvm-project/commit/4a3722a2c3dff1fe885cc38bf43d3c095c9851e7
DIFF: https://github.com/llvm/llvm-project/commit/4a3722a2c3dff1fe885cc38bf43d3c095c9851e7.diff

LOG: [libcxxabi] 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.

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

Added: 
    

Modified: 
    libcxxabi/include/__cxxabi_config.h

Removed: 
    


################################################################################
diff  --git a/libcxxabi/include/__cxxabi_config.h b/libcxxabi/include/__cxxabi_config.h
index 11a74db2ef97a..c97dd656e165c 100644
--- a/libcxxabi/include/__cxxabi_config.h
+++ b/libcxxabi/include/__cxxabi_config.h
@@ -10,7 +10,7 @@
 #define ____CXXABI_CONFIG_H
 
 #if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) &&                 \
-    !defined(__ARM_DWARF_EH__)
+    !defined(__ARM_DWARF_EH__) && !defined(__SEH__)
 #define _LIBCXXABI_ARM_EHABI
 #endif
 


        


More information about the libcxx-commits mailing list