summaryrefslogtreecommitdiffstats
path: root/llvm/tools/lto
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2015-01-29 17:20:41 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2015-01-29 17:20:41 +0000
commit50a20c0e42a97bfd394ad6e71b3ef10bc0ca4063 (patch)
tree40977056957b88f301317be3d68883f63aa8be6c /llvm/tools/lto
parent89b0ad2647e7685651695d501877a916f828b48a (diff)
downloadbcm5719-llvm-50a20c0e42a97bfd394ad6e71b3ef10bc0ca4063.tar.gz
bcm5719-llvm-50a20c0e42a97bfd394ad6e71b3ef10bc0ca4063.zip
[lto] Disable dialog boxes on crash on Windows.
This has to be done in the DLL because the state doesn't cross DLL boundaries. llvm-svn: 227471
Diffstat (limited to 'llvm/tools/lto')
-rw-r--r--llvm/tools/lto/lto.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/tools/lto/lto.cpp b/llvm/tools/lto/lto.cpp
index ec0372ea560..74e0dbe5e37 100644
--- a/llvm/tools/lto/lto.cpp
+++ b/llvm/tools/lto/lto.cpp
@@ -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();
OpenPOWER on IntegriCloud