diff options
author | Adrian Prantl <aprantl@apple.com> | 2015-02-25 02:46:37 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2015-02-25 02:46:37 +0000 |
commit | db41e64a610fdd11f5f0434d277da03f1d222e4f (patch) | |
tree | b66ce76536916d022e564bdb9faf850010ef292c /pp-trace | |
parent | ad503884e4b33493602e8376d8428c192e2de491 (diff) |
Revert "Adapt clang-tools-extra to clang module format changes."
This reverts commit 230424.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@230456 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'pp-trace')
-rw-r--r-- | pp-trace/Makefile | 6 | ||||
-rw-r--r-- | pp-trace/PPTrace.cpp | 47 |
2 files changed, 24 insertions, 29 deletions
diff --git a/pp-trace/Makefile b/pp-trace/Makefile index 81bcb302..3467ecb3 100644 --- a/pp-trace/Makefile +++ b/pp-trace/Makefile @@ -14,10 +14,8 @@ TOOLNAME = pp-trace # No plugins, optimize startup time. TOOL_NO_EXPORTS = 1 -include $(CLANG_LEVEL)/../../Makefile.config -LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader ipo objcarcopts \ - instrumentation bitwriter support mc option -USEDLIBS = clangFrontend.a clangCodeGen.a clangSerialization.a clangDriver.a \ +LINK_COMPONENTS := mcparser bitreader support mc option TransformUtils +USEDLIBS = clangFrontend.a clangSerialization.a clangDriver.a \ clangTooling.a clangParse.a clangSema.a clangAnalysis.a \ clangEdit.a clangAST.a clangLex.a clangBasic.a diff --git a/pp-trace/PPTrace.cpp b/pp-trace/PPTrace.cpp index fa986398..aae62151 100644 --- a/pp-trace/PPTrace.cpp +++ b/pp-trace/PPTrace.cpp @@ -79,6 +79,28 @@ using namespace clang::tooling; using namespace llvm; using namespace llvm::opt; +// Options: + +// Collect the source files. +cl::list<std::string> SourcePaths(cl::Positional, + cl::desc("<source0> [... <sourceN>]"), + cl::OneOrMore); + +// Option to specify a list or one or more callback names to ignore. +cl::opt<std::string> IgnoreCallbacks( + "ignore", cl::init(""), + cl::desc("Ignore callbacks, i.e. \"Callback1, Callback2...\".")); + +// Option to specify the trace output file name. +cl::opt<std::string> OutputFileName( + "output", cl::init(""), + cl::desc("Output trace to the given file name or '-' for stdout.")); + +// Collect all other arguments, which will be passed to the front end. +cl::list<std::string> +CC1Arguments(cl::ConsumeAfter, + cl::desc("<arguments to be passed to front end>...")); + // Frontend action stuff: // Consumer is responsible for setting up the callbacks. @@ -153,35 +175,10 @@ int outputPPTrace(std::vector<CallbackCall> &CallbackCalls, // Program entry point. int main(int Argc, const char **Argv) { - // Collect the source files. - cl::list<std::string> SourcePaths(cl::Positional, - cl::desc("<source0> [... <sourceN>]"), - cl::OneOrMore); - - // Option to specify a list or one or more callback names to ignore. - cl::opt<std::string> IgnoreCallbacks( - "ignore", cl::init(""), - cl::desc("Ignore callbacks, i.e. \"Callback1, Callback2...\".")); - - // Option to specify the trace output file name. - cl::opt<std::string> OutputFileName( - "output", cl::init(""), - cl::desc("Output trace to the given file name or '-' for stdout.")); - // Collect all other arguments, which will be passed to the front end. - cl::list<std::string> - CC1Arguments(cl::ConsumeAfter, - cl::desc("<arguments to be passed to front end>...")); // Parse command line. cl::ParseCommandLineOptions(Argc, Argv, "pp-trace.\n"); - // Unregister our options so they don't interfere with the command line - // parsing in CodeGen/BackendUtil.cpp. - CC1Arguments.removeArgument(); - OutputFileName.removeArgument(); - IgnoreCallbacks.removeArgument(); - SourcePaths.removeArgument(); - // Parse the IgnoreCallbacks list into strings. SmallVector<StringRef, 32> IgnoreCallbacksStrings; StringRef(IgnoreCallbacks).split(IgnoreCallbacksStrings, ",", |