aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-rtdyld
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2013-11-05 09:33:43 +0000
committerAlp Toker <alp@nuanti.com>2013-11-05 09:33:43 +0000
commit4d6b695c953462c3317e3a7eb57d0534db858ac2 (patch)
treed62a7aec11d6b2fc32c53732063578361b153c9e /tools/llvm-rtdyld
parent19648c00d66d5fc35c7954faa0bc63a34f68cb9d (diff)
downloadexternal_llvm-4d6b695c953462c3317e3a7eb57d0534db858ac2.zip
external_llvm-4d6b695c953462c3317e3a7eb57d0534db858ac2.tar.gz
external_llvm-4d6b695c953462c3317e3a7eb57d0534db858ac2.tar.bz2
Suppress OS crash dialog in llvm-rtdyld
All other tools have this -- it's needed to avoid hanging lit on Windows in case of a crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-rtdyld')
-rw-r--r--tools/llvm-rtdyld/llvm-rtdyld.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/llvm-rtdyld/llvm-rtdyld.cpp b/tools/llvm-rtdyld/llvm-rtdyld.cpp
index c5c2854..531595e 100644
--- a/tools/llvm-rtdyld/llvm-rtdyld.cpp
+++ b/tools/llvm-rtdyld/llvm-rtdyld.cpp
@@ -22,6 +22,8 @@
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/Memory.h"
#include "llvm/Support/MemoryBuffer.h"
+#include "llvm/Support/PrettyStackTrace.h"
+#include "llvm/Support/Signals.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/system_error.h"
using namespace llvm;
@@ -239,6 +241,9 @@ static int executeInput() {
}
int main(int argc, char **argv) {
+ sys::PrintStackTraceOnErrorSignal();
+ PrettyStackTraceProgram X(argc, argv);
+
ProgramName = argv[0];
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.