[PATCH] D50414: [libunwind][include] Add SEH declarations to <unwind.h>.

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 7 23:11:37 PDT 2018


mstorsjo added a comment.

Should we maybe add the same declaration of `_GCC_specific_handler` to clang's unwind.h? That would allow removing the forward declaration in libcxxabi from https://reviews.llvm.org/D49638.

Do you plan on implementing these SEH specific bits in libunwind, or are you just trying to sync things?



================
Comment at: include/unwind.h:383
+#ifdef __x86_64__
+// The DISPATCHER_CONTEXT struct is only defined on x64.
+extern EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD exc,
----------------
I think `__x86_64__` is the wrong condition here. `DISPATCHER_CONTEXT` is defined on ARM and ARM64 as well (and probably other obscure cases like IA-64), so I would rather make this `#ifndef __i386__` instead, or explicitly listing `__x86_64__`, `__arm__` and `__aarch64__`.

On the other hand, we don't really ever build code with `__SEH__` defined for i386 here either, so we could also just leave it out - I see that GCC's unwind.h does that.


Repository:
  rUNW libunwind

https://reviews.llvm.org/D50414





More information about the cfe-commits mailing list