diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2010-10-06 02:15:22 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2010-10-06 02:15:22 +0000 |
commit | a8bbe707dc0c397d4020e7348fda64b3cb2a0e21 (patch) | |
tree | ddfb374b7404468d82727e05cdaad9bf8f9f7b57 /lib/System | |
parent | 34711747a1d2c8713e69333bacef1c880810e371 (diff) | |
download | external_llvm-a8bbe707dc0c397d4020e7348fda64b3cb2a0e21.zip external_llvm-a8bbe707dc0c397d4020e7348fda64b3cb2a0e21.tar.gz external_llvm-a8bbe707dc0c397d4020e7348fda64b3cb2a0e21.tar.bz2 |
lib/System/Win32/Signals.inc: Enable LLVM_DISABLE_CRT_DEBUG also on mingw.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115731 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System')
-rw-r--r-- | lib/System/Win32/Signals.inc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/System/Win32/Signals.inc b/lib/System/Win32/Signals.inc index 2498a26..616bb29 100644 --- a/lib/System/Win32/Signals.inc +++ b/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) |