[llvm-commits] [llvm] r115731 - /llvm/trunk/lib/System/Win32/Signals.inc

NAKAMURA Takumi geek4civic at gmail.com
Tue Oct 5 19:15:23 PDT 2010


Author: chapuni
Date: Tue Oct  5 21:15:22 2010
New Revision: 115731

URL: http://llvm.org/viewvc/llvm-project?rev=115731&view=rev
Log:
lib/System/Win32/Signals.inc: Enable LLVM_DISABLE_CRT_DEBUG also on mingw.

Modified:
    llvm/trunk/lib/System/Win32/Signals.inc

Modified: llvm/trunk/lib/System/Win32/Signals.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Win32/Signals.inc?rev=115731&r1=115730&r2=115731&view=diff
==============================================================================
--- llvm/trunk/lib/System/Win32/Signals.inc (original)
+++ llvm/trunk/lib/System/Win32/Signals.inc Tue Oct  5 21:15:22 2010
@@ -43,9 +43,7 @@
 static std::vector<std::pair<void(*)(void*), void*> > *CallBacksToRun = 0;
 static bool RegisteredUnhandledExceptionFilter = false;
 static bool CleanupExecuted = false;
-#ifdef _MSC_VER
 static bool ExitOnUnhandledExceptions = false;
-#endif
 static PTOP_LEVEL_EXCEPTION_FILTER OldFilter = NULL;
 
 // Windows creates a new thread to execute the console handler when an event
@@ -110,12 +108,12 @@
   SetConsoleCtrlHandler(LLVMConsoleCtrlHandler, TRUE);
 
   // Environment variable to disable any kind of crash dialog.
-#ifdef _MSC_VER
   if (getenv("LLVM_DISABLE_CRT_DEBUG")) {
+#ifdef _MSC_VER
     _CrtSetReportHook(CRTReportHook);
+#endif
     ExitOnUnhandledExceptions = true;
   }
-#endif
 
   // IMPORTANT NOTE: Caller must call LeaveCriticalSection(&CriticalSection) or
   // else multi-threading problems will ensue.
@@ -295,10 +293,8 @@
       assert(0 && "Crashed in LLVMUnhandledExceptionFilter");
   }
 
-#ifdef _MSC_VER
   if (ExitOnUnhandledExceptions)
     _exit(-3);
-#endif
 
   // Allow dialog box to pop up allowing choice to start debugger.
   if (OldFilter)





More information about the llvm-commits mailing list