[clang] [clang] Fix catching pointers by reference on mingw targets (PR #162546)
Martin Storsjö via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 8 13:57:07 PDT 2025
mstorsjo wrote:
> > (See the SEH ifdef in `_Unwind_Exception` in clang/lib/Headers/unwind.h.)
>
> The header also checks that `__USING_SJLJ_EXCEPTIONS__` is not defined. Is that just redundant?
Possibly, yes. I think those ifdefs stem from the corresponding cases in GCC's `unwind.h`, and we've tried to stay compatible with that. I'm not sure if it's possible to somehow end up having both `__USING_SJLJ_EXCEPTIONS__` and `__SEH__` defined at the same time there (but if it is, the interpretation is that SJLJ takes precedence). Within Clang I don't think that's possible; the `ExceptionHandling` field in `CodeGenOptions` is an enum that can only have one of the values at a time at least.
https://github.com/llvm/llvm-project/pull/162546
More information about the cfe-commits
mailing list