Make sure to print a stack trace whenever an error signal is delivered to the
tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11632 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp
index 2404288..030ffe4 100644
--- a/tools/llvm-ar/llvm-ar.cpp
+++ b/tools/llvm-ar/llvm-ar.cpp
@@ -15,6 +15,7 @@
#include "llvm/Bytecode/Reader.h"
#include "Support/CommandLine.h"
#include "Support/FileUtilities.h"
+#include "Support/Signals.h"
#include <string>
#include <fstream>
#include <cstdio>
@@ -544,9 +545,9 @@
}
int main(int argc, char **argv) {
-
- //Parse Command line options
cl::ParseCommandLineOptions(argc, argv);
+ PrintStackTraceOnErrorSignal();
+
parseCL();
//Create archive!