[llvm] r303220 - Fix for compilers with older CRT header libraries.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 15:59:34 PDT 2017


Author: zturner
Date: Tue May 16 17:59:34 2017
New Revision: 303220

URL: http://llvm.org/viewvc/llvm-project?rev=303220&view=rev
Log:
Fix for compilers with older CRT header libraries.

Modified:
    llvm/trunk/lib/Support/CrashRecoveryContext.cpp

Modified: llvm/trunk/lib/Support/CrashRecoveryContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CrashRecoveryContext.cpp?rev=303220&r1=303219&r2=303220&view=diff
==============================================================================
--- llvm/trunk/lib/Support/CrashRecoveryContext.cpp (original)
+++ llvm/trunk/lib/Support/CrashRecoveryContext.cpp Tue May 16 17:59:34 2017
@@ -164,10 +164,15 @@ CrashRecoveryContext::unregisterCleanup(
 
 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
   switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
   {
   case DBG_PRINTEXCEPTION_C:
-  case DBG_PRINTEXCEPTION_WIDE_C:
+  case WideDbgPrintValue:
   case 0x406D1388:  // set debugger thread name
     return EXCEPTION_CONTINUE_EXECUTION;
   }




More information about the llvm-commits mailing list