summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2010-10-06 02:15:22 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2010-10-06 02:15:22 +0000
commitad205575fcaaf17f00fdde3cda58eb6db1542fa4 (patch)
tree03ac11c23880badb04b8c2cabdfbd801613c58fd /llvm/lib
parent2a981c205618152efceb7c6130000a7f19dcb472 (diff)
downloadbcm5719-llvm-ad205575fcaaf17f00fdde3cda58eb6db1542fa4.tar.gz
bcm5719-llvm-ad205575fcaaf17f00fdde3cda58eb6db1542fa4.zip
lib/System/Win32/Signals.inc: Enable LLVM_DISABLE_CRT_DEBUG also on mingw.
llvm-svn: 115731
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/System/Win32/Signals.inc8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/System/Win32/Signals.inc b/llvm/lib/System/Win32/Signals.inc
index 2498a26ea99..616bb29a6ec 100644
--- a/llvm/lib/System/Win32/Signals.inc
+++ b/llvm/lib/System/Win32/Signals.inc
@@ -43,9 +43,7 @@ static std::vector<llvm::sys::Path> *FilesToRemove = NULL;
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 @@ static void RegisterHandler() {
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 @@ static LONG WINAPI LLVMUnhandledExceptionFilter(LPEXCEPTION_POINTERS ep) {
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)
OpenPOWER on IntegriCloud