summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-19 20:33:00 +0000
committerChris Lattner <sabre@nondot.org>2004-02-19 20:33:00 +0000
commit56bfdecbdf6da54ed9ecd216a34fb03a222f3365 (patch)
tree7ef1ff934f00fdccf9706903572ced4efb43d931
parent69e896bdcfe4b4982030e512d157eeb5b1c75da4 (diff)
downloadbcm5719-llvm-56bfdecbdf6da54ed9ecd216a34fb03a222f3365.tar.gz
bcm5719-llvm-56bfdecbdf6da54ed9ecd216a34fb03a222f3365.zip
Make sure to print a stack trace whenever an error signal is delivered
to the tool. llvm-svn: 11634
-rw-r--r--llvm/tools/analyze/analyze.cpp2
-rw-r--r--llvm/tools/bugpoint/bugpoint.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/llvm/tools/analyze/analyze.cpp b/llvm/tools/analyze/analyze.cpp
index 3e1e51600e8..9d99d604f4f 100644
--- a/llvm/tools/analyze/analyze.cpp
+++ b/llvm/tools/analyze/analyze.cpp
@@ -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 {
diff --git a/llvm/tools/bugpoint/bugpoint.cpp b/llvm/tools/bugpoint/bugpoint.cpp
index 65de9658a7e..318e80ffb37 100644
--- a/llvm/tools/bugpoint/bugpoint.cpp
+++ b/llvm/tools/bugpoint/bugpoint.cpp
@@ -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;
OpenPOWER on IntegriCloud