forked from OSchip/llvm-project
Introduce llvm::sys::PrintStackTraceOnErrorSignal()
llvm-svn: 172821
This commit is contained in:
parent
d6a707f20e
commit
40ac112c91
|
@ -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 @@ static void format() {
|
|||
} // 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"
|
||||
|
|
|
@ -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 @@ static cl::opt<RiskLevel> MaxRiskLevel(
|
|||
cl::init(RL_Reasonable));
|
||||
|
||||
int main(int argc, const char **argv) {
|
||||
llvm::sys::PrintStackTraceOnErrorSignal();
|
||||
Transforms TransformManager;
|
||||
|
||||
TransformManager.createTransformOpts();
|
||||
|
|
|
@ -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::list<std::string> SourcePaths(
|
|||
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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue