[PATCH] D50564: Add support for SEH unwinding on Windows.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 14 10:00:08 PDT 2018


rnk added a comment.

In https://reviews.llvm.org/D50564#1198996, @cdavis5x wrote:

> Could somebody verify that the `DISPATCHER_CONTEXT` struct is defined in `<winnt.h>` for the Win8 and Win10 SDKs? I can't install them right now.


I checked both, and they are available, so I think we should guard the definition like this:

  // Provide a definition for _DISPATCHER_CONTEXT for Win7 and earlier SDK versions.
  // Mingw64 has always provided this struct.
  #if defined(_LIBUNWIND_SUPPORT_SEH_UNWIND) && !defined(__MINGW64__) && defined(WINVER) && WINVER < _WIN32_WINNT_WIN8
  # if defined(__x86_64__)
  typedef struct _DISPATCHER_CONTEXT { ... } DISPATCHER_CONTEXT;
  # elif defined(__arm__)
  typedef struct _DISPATCHER_CONTEXT { ... } DISPATCHER_CONTEXT;
  # endif
  #endif

Does that seem right? I'm not super familiar with SDK version detection, so I might have the wrong macros.


Repository:
  rUNW libunwind

https://reviews.llvm.org/D50564





More information about the llvm-commits mailing list