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

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

Issue 2896663002: Package the translation_unit tool as part of building the clang package. (Closed)
Patch Set: don't include unistd.h Created 3 years, 7 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/update.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
11 #include <assert.h> 11 #include <assert.h>
12 #include <unistd.h>
13 #include <fstream> 12 #include <fstream>
14 #include <iostream> 13 #include <iostream>
15 #include <memory> 14 #include <memory>
16 #include <set> 15 #include <set>
17 #include <stack> 16 #include <stack>
18 #include <string> 17 #include <string>
19 #include <vector> 18 #include <vector>
20 19
21 #include "clang/Basic/Diagnostic.h" 20 #include "clang/Basic/Diagnostic.h"
22 #include "clang/Basic/FileManager.h" 21 #include "clang/Basic/FileManager.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 259
261 int main(int argc, const char* argv[]) { 260 int main(int argc, const char* argv[]) {
262 llvm::cl::OptionCategory category("TranslationUnitGenerator Tool"); 261 llvm::cl::OptionCategory category("TranslationUnitGenerator Tool");
263 CommonOptionsParser options(argc, argv, category); 262 CommonOptionsParser options(argc, argv, category);
264 std::unique_ptr<clang::tooling::FrontendActionFactory> frontend_factory = 263 std::unique_ptr<clang::tooling::FrontendActionFactory> frontend_factory =
265 clang::tooling::newFrontendActionFactory<CompilationIndexerAction>(); 264 clang::tooling::newFrontendActionFactory<CompilationIndexerAction>();
266 clang::tooling::ClangTool tool(options.getCompilations(), 265 clang::tooling::ClangTool tool(options.getCompilations(),
267 options.getSourcePathList()); 266 options.getSourcePathList());
268 return tool.run(frontend_factory.get()); 267 return tool.run(frontend_factory.get());
269 } 268 }
OLDNEW
« no previous file with comments | « tools/clang/scripts/update.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698