Revert "Adapt clang-tools-extra to clang module format changes."

This reverts commit 230424.

llvm-svn: 230456
This commit is contained in:
Adrian Prantl 2015-02-25 02:46:37 +00:00
parent 2be16291ff
commit b97f5c1eb2
15 changed files with 50 additions and 71 deletions

View File

@ -17,10 +17,9 @@ TOOL_NO_EXPORTS = 1
SOURCES = ClangApplyReplacementsMain.cpp
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader ipo objcarcopts \
instrumentation bitwriter support mc option
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc mcparser option
USEDLIBS = clangApplyReplacements.a clangFormat.a \
clangTooling.a clangToolingCore.a clangFrontend.a clangCodeGen.a \
clangTooling.a clangToolingCore.a clangFrontend.a \
clangSerialization.a clangDriver.a clangRewriteFrontend.a \
clangRewrite.a clangParse.a clangSema.a clangAnalysis.a \
clangAST.a clangASTMatchers.a clangEdit.a clangLex.a clangBasic.a

View File

@ -35,10 +35,9 @@ BUILT_SOURCES += $(ObjDir)/../PassByValue/.objdir
SOURCES += $(addprefix ../ReplaceAutoPtr/,$(notdir $(wildcard $(PROJ_SRC_DIR)/../ReplaceAutoPtr/*.cpp)))
BUILT_SOURCES += $(ObjDir)/../ReplaceAutoPtr/.objdir
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader ipo objcarcopts \
instrumentation bitwriter support mc option
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc mcparser option
USEDLIBS = modernizeCore.a clangFormat.a \
clangTooling.a clangToolingCore.a clangFrontend.a clangCodeGen.a \
clangTooling.a clangToolingCore.a clangFrontend.a \
clangSerialization.a clangDriver.a clangRewriteFrontend.a \
clangRewrite.a clangParse.a clangSema.a clangAnalysis.a \
clangAST.a clangASTMatchers.a clangEdit.a clangLex.a clangBasic.a

View File

@ -17,10 +17,9 @@ TOOL_NO_EXPORTS = 1
SOURCES = ClangQuery.cpp
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader ipo objcarcopts \
instrumentation bitwriter support mc option
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc mcparser option
USEDLIBS = clangQuery.a clangDynamicASTMatchers.a clangFormat.a clangTooling.a \
clangFrontend.a clangCodeGen.a clangSerialization.a clangDriver.a clangRewriteFrontend.a \
clangFrontend.a clangSerialization.a clangDriver.a clangRewriteFrontend.a \
LLVMLineEditor.a clangRewrite.a clangParse.a clangSema.a clangAnalysis.a \
clangAST.a clangASTMatchers.a clangEdit.a clangLex.a clangBasic.a

View File

@ -1,9 +1,8 @@
CLANG_LEVEL := ../../../..
TOOLNAME = clang-rename
include $(CLANG_LEVEL)/../../Makefile.config
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader ipo objcarcopts \
instrumentation bitwriter support mc option
USEDLIBS = clangRename.a clangFrontend.a clangCodeGen.a clangSerialization.a clangDriver.a \
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
USEDLIBS = clangRename.a clangFrontend.a clangSerialization.a clangDriver.a \
clangTooling.a clangToolingCore.a \
clangParse.a clangSema.a clangIndex.a \
clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a \

View File

@ -15,14 +15,13 @@ TOOLNAME = clang-tidy
TOOL_NO_EXPORTS = 1
include $(CLANG_LEVEL)/../../Makefile.config
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader ipo objcarcopts \
instrumentation bitwriter support mc option
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
USEDLIBS = clangTidy.a clangTidyLLVMModule.a clangTidyGoogleModule.a \
clangTidyMiscModule.a clangTidyReadability.a clangTidyUtils.a \
clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a \
clangStaticAnalyzerCore.a \
clangFormat.a clangASTMatchers.a clangTooling.a clangToolingCore.a \
clangFrontend.a clangCodeGen.a clangSerialization.a clangDriver.a clangParse.a \
clangFrontend.a clangSerialization.a clangDriver.a clangParse.a \
clangSema.a clangAnalysis.a clangRewriteFrontend.a clangRewrite.a \
clangEdit.a clangAST.a clangLex.a clangBasic.a

View File

@ -15,10 +15,8 @@ NO_INSTALL = 0
# 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

View File

@ -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

View File

@ -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, ",",

View File

@ -16,10 +16,8 @@ NO_INSTALL = 1
TOOL_NO_EXPORTS = 1
include $(CLANG_LEVEL)/../../Makefile.config
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader ipo objcarcopts \
instrumentation bitwriter support mc option
USEDLIBS = clangTooling.a clangFrontend.a clangCodeGen.a \
clangSerialization.a clangDriver.a \
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
USEDLIBS = clangTooling.a clangFrontend.a clangSerialization.a clangDriver.a \
clangToolingCore.a clangRewriteFrontend.a clangRewrite.a \
clangParse.a clangSema.a clangAnalysis.a \
clangAST.a clangASTMatchers.a clangEdit.a clangLex.a clangBasic.a

View File

@ -16,10 +16,8 @@ NO_INSTALL = 1
TOOL_NO_EXPORTS = 1
include $(CLANG_LEVEL)/../../Makefile.config
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader ipo objcarcopts \
instrumentation bitwriter support mc option
USEDLIBS = clangTooling.a clangFrontend.a clangCodeGen.a \
clangSerialization.a clangDriver.a \
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
USEDLIBS = clangTooling.a clangFrontend.a clangSerialization.a clangDriver.a \
clangRewriteFrontend.a clangToolingCore.a clangRewrite.a \
clangParse.a clangSema.a clangAnalysis.a \
clangAST.a clangASTMatchers.a clangEdit.a clangLex.a clangBasic.a

View File

@ -11,11 +11,10 @@ CLANG_LEVEL = ../../../..
include $(CLANG_LEVEL)/../../Makefile.config
TESTNAME = ClangApplyReplacementsTests
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader ipo objcarcopts \
instrumentation bitwriter support mc option \
LINK_COMPONENTS := asmparser bitreader support mc mcparser option \
TransformUtils
USEDLIBS = clangApplyReplacements.a clangFormat.a clangTooling.a \
clangToolingCore.a clangFrontend.a clangCodeGen.a \
clangToolingCore.a clangFrontend.a \
clangSerialization.a clangDriver.a clangRewriteFrontend.a \
clangRewrite.a clangParse.a clangSema.a clangAnalysis.a \
clangAST.a clangASTMatchers.a clangEdit.a clangLex.a clangBasic.a

View File

@ -11,11 +11,10 @@ CLANG_LEVEL = ../../../..
include $(CLANG_LEVEL)/../../Makefile.config
TESTNAME = ClangModernizeTests
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader ipo objcarcopts \
instrumentation bitwriter support mc option \
LINK_COMPONENTS := asmparser bitreader support MC MCParser option \
TransformUtils
USEDLIBS = modernizeCore.a clangFormat.a clangApplyReplacements.a \
clangTooling.a clangToolingCore.a clangFrontend.a clangCodeGen.a \
clangTooling.a clangToolingCore.a clangFrontend.a \
clangSerialization.a clangDriver.a clangRewriteFrontend.a \
clangRewrite.a clangParse.a clangSema.a clangAnalysis.a \
clangAST.a clangASTMatchers.a clangEdit.a clangLex.a \

View File

@ -11,10 +11,9 @@ CLANG_LEVEL = ../../../..
include $(CLANG_LEVEL)/../../Makefile.config
TESTNAME = ClangQuery
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader ipo objcarcopts \
instrumentation bitwriter support mc option \
LINK_COMPONENTS := asmparser bitreader support MC MCParser option \
TransformUtils
USEDLIBS = clangQuery.a clangTooling.a clangFrontend.a clangCodeGen.a clangSerialization.a \
USEDLIBS = clangQuery.a clangTooling.a clangFrontend.a clangSerialization.a \
clangDriver.a clangParse.a clangSema.a clangEdit.a clangAnalysis.a \
clangAST.a clangASTMatchers.a clangDynamicASTMatchers.a clangLex.a \
clangBasic.a

View File

@ -11,10 +11,9 @@ CLANG_LEVEL = ../../../..
include $(CLANG_LEVEL)/../../Makefile.config
TESTNAME = ClangRenameTests
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader ipo objcarcopts \
instrumentation bitwriter support mc option \
LINK_COMPONENTS := asmparser bitreader support MC MCParser option \
TransformUtils
USEDLIBS = clangRename.a clangFrontend.a clangCodeGen.a clangSerialization.a clangDriver.a \
USEDLIBS = clangRename.a clangFrontend.a clangSerialization.a clangDriver.a \
clangTooling.a clangParse.a clangSema.a clangIndex.a \
clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a \
clangStaticAnalyzerCore.a clangAnalysis.a clangRewriteFrontend.a \

View File

@ -11,8 +11,7 @@ CLANG_LEVEL = ../../../..
include $(CLANG_LEVEL)/../../Makefile.config
TESTNAME = ClangTidy
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader ipo objcarcopts \
instrumentation bitwriter support mc option \
LINK_COMPONENTS := asmparser bitreader support MC MCParser option \
TransformUtils
USEDLIBS = clangTidy.a clangTidyLLVMModule.a clangTidyGoogleModule.a \
clangTidyMiscModule.a clangTidyReadability.a clangTidy.a \
@ -20,7 +19,7 @@ USEDLIBS = clangTidy.a clangTidyLLVMModule.a clangTidyGoogleModule.a \
clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a \
clangStaticAnalyzerCore.a \
clangFormat.a clangTooling.a clangToolingCore.a \
clangFrontend.a clangCodeGen.a clangSerialization.a \
clangFrontend.a clangSerialization.a \
clangDriver.a clangRewriteFrontend.a clangRewrite.a \
clangParse.a clangSema.a clangAnalysis.a clangAST.a \
clangASTMatchers.a clangEdit.a clangLex.a clangBasic.a