[cfe-commits] [clang-tools-extra] r172821 - in /clang-tools-extra/trunk: clang-format/ClangFormat.cpp cpp11-migrate/Cpp11Migrate.cpp remove-cstr-calls/RemoveCStrCalls.cpp tool-template/ToolTemplate.cpp

NAKAMURA Takumi geek4civic at gmail.com
Fri Jan 18 06:31:01 PST 2013


Author: chapuni
Date: Fri Jan 18 08:31:00 2013
New Revision: 172821

URL: http://llvm.org/viewvc/llvm-project?rev=172821&view=rev
Log:
Introduce llvm::sys::PrintStackTraceOnErrorSignal()

Modified:
    clang-tools-extra/trunk/clang-format/ClangFormat.cpp
    clang-tools-extra/trunk/cpp11-migrate/Cpp11Migrate.cpp
    clang-tools-extra/trunk/remove-cstr-calls/RemoveCStrCalls.cpp
    clang-tools-extra/trunk/tool-template/ToolTemplate.cpp

Modified: clang-tools-extra/trunk/clang-format/ClangFormat.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-format/ClangFormat.cpp?rev=172821&r1=172820&r2=172821&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-format/ClangFormat.cpp (original)
+++ clang-tools-extra/trunk/clang-format/ClangFormat.cpp Fri Jan 18 08:31:00 2013
@@ -21,6 +21,7 @@
 #include "clang/Lex/Lexer.h"
 #include "clang/Rewrite/Core/Rewriter.h"
 #include "llvm/Support/FileSystem.h"
+#include "llvm/Support/Signals.h"
 
 using namespace llvm;
 
@@ -114,6 +115,7 @@
 }  // namespace clang
 
 int main(int argc, const char **argv) {
+  llvm::sys::PrintStackTraceOnErrorSignal();
   cl::ParseCommandLineOptions(
       argc, argv,
       "A tool to format C/C++/Obj-C code.\n\n"

Modified: clang-tools-extra/trunk/cpp11-migrate/Cpp11Migrate.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/cpp11-migrate/Cpp11Migrate.cpp?rev=172821&r1=172820&r2=172821&view=diff
==============================================================================
--- clang-tools-extra/trunk/cpp11-migrate/Cpp11Migrate.cpp (original)
+++ clang-tools-extra/trunk/cpp11-migrate/Cpp11Migrate.cpp Fri Jan 18 08:31:00 2013
@@ -32,6 +32,7 @@
 #include "clang/Frontend/FrontendActions.h"
 #include "clang/Tooling/CommonOptionsParser.h"
 #include "clang/Tooling/Tooling.h"
+#include "llvm/Support/Signals.h"
 
 namespace cl = llvm::cl;
 using namespace clang::tooling;
@@ -49,6 +50,7 @@
     cl::init(RL_Reasonable));
 
 int main(int argc, const char **argv) {
+  llvm::sys::PrintStackTraceOnErrorSignal();
   Transforms TransformManager;
 
   TransformManager.createTransformOpts();

Modified: clang-tools-extra/trunk/remove-cstr-calls/RemoveCStrCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/remove-cstr-calls/RemoveCStrCalls.cpp?rev=172821&r1=172820&r2=172821&view=diff
==============================================================================
--- clang-tools-extra/trunk/remove-cstr-calls/RemoveCStrCalls.cpp (original)
+++ clang-tools-extra/trunk/remove-cstr-calls/RemoveCStrCalls.cpp Fri Jan 18 08:31:00 2013
@@ -47,6 +47,7 @@
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Path.h"
+#include "llvm/Support/Signals.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/system_error.h"
 
@@ -177,6 +178,7 @@
   cl::OneOrMore);
 
 int main(int argc, const char **argv) {
+  llvm::sys::PrintStackTraceOnErrorSignal();
   llvm::OwningPtr<CompilationDatabase> Compilations(
     tooling::FixedCompilationDatabase::loadFromCommandLine(argc, argv));
   cl::ParseCommandLineOptions(argc, argv);

Modified: clang-tools-extra/trunk/tool-template/ToolTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/tool-template/ToolTemplate.cpp?rev=172821&r1=172820&r2=172821&view=diff
==============================================================================
--- clang-tools-extra/trunk/tool-template/ToolTemplate.cpp (original)
+++ clang-tools-extra/trunk/tool-template/ToolTemplate.cpp Fri Jan 18 08:31:00 2013
@@ -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::OneOrMore);
 
 int main(int argc, const char **argv) {
+  llvm::sys::PrintStackTraceOnErrorSignal();
   llvm::OwningPtr<CompilationDatabase> Compilations(
         FixedCompilationDatabase::loadFromCommandLine(argc, argv));
   cl::ParseCommandLineOptions(argc, argv);





More information about the cfe-commits mailing list