diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-01-18 14:31:00 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-01-18 14:31:00 +0000 |
commit | f6b81786a7e1ee6297fb7a4348ef8fbfa6d42784 (patch) | |
tree | 4818c8be155deb53e663e5f94ef0f6e58a92cbe3 /tool-template | |
parent | f1360fc78e8b536000bb4abd5146d0394a7d2e3c (diff) |
Introduce llvm::sys::PrintStackTraceOnErrorSignal()
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@172821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tool-template')
-rw-r--r-- | tool-template/ToolTemplate.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tool-template/ToolTemplate.cpp b/tool-template/ToolTemplate.cpp index 93b01892..5c4159cc 100644 --- a/tool-template/ToolTemplate.cpp +++ b/tool-template/ToolTemplate.cpp @@ -45,6 +45,7 @@ #include "llvm/ADT/OwningPtr.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/Signals.h" using namespace clang; using namespace clang::ast_matchers; @@ -79,6 +80,7 @@ cl::list<std::string> SourcePaths( cl::OneOrMore); int main(int argc, const char **argv) { + llvm::sys::PrintStackTraceOnErrorSignal(); llvm::OwningPtr<CompilationDatabase> Compilations( FixedCompilationDatabase::loadFromCommandLine(argc, argv)); cl::ParseCommandLineOptions(argc, argv); |