[include-fixer] Abstract includeFixerMain function.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@268371 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Haojian Wu 2016-05-03 08:38:35 +00:00
Родитель a01ae3ea2b
Коммит d69aa22331
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -42,9 +42,8 @@ cl::opt<bool>
MinimizeIncludePaths("minimize-paths",
cl::desc("Whether to minimize added include paths"),
cl::init(true), cl::cat(IncludeFixerCategory));
} // namespace
int main(int argc, const char **argv) {
int includeFixerMain(int argc, const char **argv) {
tooling::CommonOptionsParser options(argc, argv, IncludeFixerCategory);
tooling::ClangTool tool(options.getCompilations(),
options.getSourcePathList());
@ -97,3 +96,9 @@ int main(int argc, const char **argv) {
tooling::applyAllReplacements(Replacements, Rewrites);
return Rewrites.overwriteChangedFiles();
}
} // namespace
int main(int argc, const char **argv) {
return includeFixerMain(argc, argv);
}