[builtins] Check __SEH__, when checking if ARM EHABI is implied
authorMartin Storsjö <martin@martin.st>
Fri, 6 May 2022 21:19:05 +0000 (00:19 +0300)
committerMartin Storsjö <martin@martin.st>
Mon, 6 Jun 2022 20:23:08 +0000 (23:23 +0300)
commit03c19f41a26a8007b6c994eea3b3c308562e6d59
tree19c700a439e61861e635cc7e7b3ede20be7a5a03
parent2293d46a01752e312a0796d044a25a49b2fd17f5
[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
compiler-rt/lib/builtins/gcc_personality_v0.c