Make sure to print a stack trace whenever an error signal is delivered
authorChris Lattner <sabre@nondot.org>
Thu, 19 Feb 2004 20:33:00 +0000 (20:33 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 19 Feb 2004 20:33:00 +0000 (20:33 +0000)
to the tool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11634 91177308-0d34-0410-b5e6-96231b3b80d8

tools/analyze/analyze.cpp
tools/bugpoint/bugpoint.cpp

index 3e1e51600e8b2d85645220ece8f5d8992e2bde41..9d99d604f4f939d635a28dbeb8d1aca072cb3aab 100644 (file)
@@ -23,6 +23,7 @@
 #include "llvm/Analysis/Verifier.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/Support/PassNameParser.h"
+#include "Support/Signals.h"
 #include "Support/Timer.h"
 #include <algorithm>
 
@@ -115,6 +116,7 @@ namespace {
 
 int main(int argc, char **argv) {
   cl::ParseCommandLineOptions(argc, argv, " llvm analysis printer tool\n");
+  PrintStackTraceOnErrorSignal();
 
   Module *CurMod = 0;
   try {
index 65de9658a7e4ce2476ce66bc6945a6fa2d111984..318e80ffb376e2e9f0c0af1047f5aaa5c8fc964c 100644 (file)
@@ -17,6 +17,7 @@
 #include "llvm/Support/PassNameParser.h"
 #include "llvm/Support/ToolRunner.h"
 #include "Support/CommandLine.h"
+#include "Support/Signals.h"
 #include "Config/unistd.h"
 #include <sys/resource.h>
 using namespace llvm;
@@ -36,6 +37,7 @@ int main(int argc, char **argv) {
                               " LLVM automatic testcase reducer. See\nhttp://"
                               "llvm.cs.uiuc.edu/docs/CommandGuide/bugpoint.html"
                               " for more information.\n");
+  PrintStackTraceOnErrorSignal();
 
   BugDriver D(argv[0]);
   if (D.addSources(InputFilenames)) return 1;