summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CrashRecoveryContext.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-05-17 16:39:33 +0000
committerZachary Turner <zturner@google.com>2017-05-17 16:39:33 +0000
commit0daa7074bfeef43f656ddac3253b20b95ee15ffa (patch)
treedbbaf8d9a82779de1c48fce18097cf4d4467fb13 /llvm/lib/Support/CrashRecoveryContext.cpp
parent1d795c451e132f3a1232821aeb941ce303ef3b96 (diff)
downloadbcm5719-llvm-0daa7074bfeef43f656ddac3253b20b95ee15ffa.tar.gz
bcm5719-llvm-0daa7074bfeef43f656ddac3253b20b95ee15ffa.zip
Workaround for incorrect Win32 header on GCC.
llvm-svn: 303272
Diffstat (limited to 'llvm/lib/Support/CrashRecoveryContext.cpp')
-rw-r--r--llvm/lib/Support/CrashRecoveryContext.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/Support/CrashRecoveryContext.cpp b/llvm/lib/Support/CrashRecoveryContext.cpp
index f49630411e5..6ebde46203f 100644
--- a/llvm/lib/Support/CrashRecoveryContext.cpp
+++ b/llvm/lib/Support/CrashRecoveryContext.cpp
@@ -164,15 +164,13 @@ CrashRecoveryContext::unregisterCleanup(CrashRecoveryContextCleanup *cleanup) {
static LONG CALLBACK ExceptionHandler(PEXCEPTION_POINTERS ExceptionInfo)
{
-#ifdef DBG_PRINTEXCEPTION_WIDE_C
- constexpr ULONG WideDbgPrintValue = DBG_PRINTEXCEPTION_WIDE_C;
-#else
- constexpr ULONG WideDbgPrintValue = 0x4001000AL;
-#endif
+ // DBG_PRINTEXCEPTION_WIDE_C is not properly defined on all supported
+ // compilers and platforms, so we define it manually.
+ constexpr ULONG DbgPrintExceptionWideC = 0x4001000AL;
switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
{
case DBG_PRINTEXCEPTION_C:
- case WideDbgPrintValue:
+ case DbgPrintExceptionWideC:
case 0x406D1388: // set debugger thread name
return EXCEPTION_CONTINUE_EXECUTION;
}
OpenPOWER on IntegriCloud