[llvm] r227471 - [lto] Disable dialog boxes on crash on Windows.
Michael J. Spencer
bigcheesegs at gmail.com
Thu Jan 29 09:20:42 PST 2015
Author: mspencer
Date: Thu Jan 29 11:20:41 2015
New Revision: 227471
URL: http://llvm.org/viewvc/llvm-project?rev=227471&view=rev
Log:
[lto] Disable dialog boxes on crash on Windows.
This has to be done in the DLL because the state doesn't cross DLL boundaries.
Modified:
llvm/trunk/tools/lto/lto.cpp
Modified: llvm/trunk/tools/lto/lto.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/lto.cpp?rev=227471&r1=227470&r2=227471&view=diff
==============================================================================
--- llvm/trunk/tools/lto/lto.cpp (original)
+++ llvm/trunk/tools/lto/lto.cpp Thu Jan 29 11:20:41 2015
@@ -18,6 +18,7 @@
#include "llvm/LTO/LTOCodeGenerator.h"
#include "llvm/LTO/LTOModule.h"
#include "llvm/Support/MemoryBuffer.h"
+#include "llvm/Support/Signals.h"
#include "llvm/Support/TargetSelect.h"
// extra command-line flags needed for LTOCodeGenerator
@@ -51,6 +52,12 @@ static bool parsedOptions = false;
// Initialize the configured targets if they have not been initialized.
static void lto_initialize() {
if (!initialized) {
+#ifdef LLVM_ON_WIN32
+ // Dialog box on crash disabling doesn't work across DLL boundaries, so do
+ // it here.
+ llvm::sys::DisableSystemDialogsOnCrash();
+#endif
+
InitializeAllTargetInfos();
InitializeAllTargets();
InitializeAllTargetMCs();
More information about the llvm-commits
mailing list