Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: tools/clang/translation_unit/TranslationUnitGenerator.cpp

Issue 2599193002: Split run_tool.py into run_tool.py, extract_edits.py and apply_edits.py (Closed)
Patch Set: Addressed remaining nits. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/clang/scripts/test_tool.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This implements a Clang tool to generate compilation information that is 5 // This implements a Clang tool to generate compilation information that is
6 // sufficient to recompile the code with clang. For each compilation unit, all 6 // sufficient to recompile the code with clang. For each compilation unit, all
7 // source files which are necessary for compiling it are determined. For each 7 // source files which are necessary for compiling it are determined. For each
8 // compilation unit, a file is created containing a list of all file paths of 8 // compilation unit, a file is created containing a list of all file paths of
9 // included files. 9 // included files.
10 10
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 258
259 static llvm::cl::extrahelp common_help(CommonOptionsParser::HelpMessage); 259 static llvm::cl::extrahelp common_help(CommonOptionsParser::HelpMessage);
260 260
261 int main(int argc, const char* argv[]) { 261 int main(int argc, const char* argv[]) {
262 llvm::cl::OptionCategory category("TranslationUnitGenerator Tool"); 262 llvm::cl::OptionCategory category("TranslationUnitGenerator Tool");
263 CommonOptionsParser options(argc, argv, category); 263 CommonOptionsParser options(argc, argv, category);
264 std::unique_ptr<clang::tooling::FrontendActionFactory> frontend_factory = 264 std::unique_ptr<clang::tooling::FrontendActionFactory> frontend_factory =
265 clang::tooling::newFrontendActionFactory<CompilationIndexerAction>(); 265 clang::tooling::newFrontendActionFactory<CompilationIndexerAction>();
266 clang::tooling::ClangTool tool(options.getCompilations(), 266 clang::tooling::ClangTool tool(options.getCompilations(),
267 options.getSourcePathList()); 267 options.getSourcePathList());
268 // This clang tool does not actually produce edits, but run_tool.py expects
269 // this. So we just print an empty edit block.
270 llvm::outs() << "==== BEGIN EDITS ====\n";
271 llvm::outs() << "==== END EDITS ====\n";
272 return tool.run(frontend_factory.get()); 268 return tool.run(frontend_factory.get());
273 } 269 }
OLDNEW
« no previous file with comments | « tools/clang/scripts/test_tool.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698