clang-check: Introduce llvm::sys::PrintStackTraceOnErrorSignal()
authorNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 18 Jan 2013 13:46:48 +0000 (13:46 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 18 Jan 2013 13:46:48 +0000 (13:46 +0000)
llvm-svn: 172818

clang/tools/clang-check/ClangCheck.cpp

index 6f62228..bf43374 100644 (file)
@@ -27,6 +27,7 @@
 #include "clang/Tooling/Tooling.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Path.h"
+#include "llvm/Support/Signals.h"
 
 using namespace clang::driver;
 using namespace clang::tooling;
@@ -142,6 +143,7 @@ public:
 }
 
 int main(int argc, const char **argv) {
+  llvm::sys::PrintStackTraceOnErrorSignal();
   CommonOptionsParser OptionsParser(argc, argv);
   ClangTool Tool(OptionsParser.getCompilations(),
                  OptionsParser.getSourcePathList());