diff options
author | Pavel Labath <labath@google.com> | 2013-06-06 11:52:19 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2013-06-06 11:52:19 +0000 |
commit | dee20c105b392d207d02871994f9fafd72fdf91b (patch) | |
tree | 8d2c9fd480593ac8ca9062afc45b9320ca62d19a /clang/lib/Tooling/Tooling.cpp | |
parent | de229235b979e030b2d9dd1402f40d29e21571ad (diff) | |
download | bcm5719-llvm-dee20c105b392d207d02871994f9fafd72fdf91b.tar.gz bcm5719-llvm-dee20c105b392d207d02871994f9fafd72fdf91b.zip |
ClangTool: strip -o from the command line
Summary:
This patch creates a new ArgumentsAdjuster, which removes all -o parameters from
the command line. This adjuster is inserted by default into the ClangTool pipeline.
Reviewers: klimek
CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D925
llvm-svn: 183398
Diffstat (limited to 'clang/lib/Tooling/Tooling.cpp')
-rw-r--r-- | clang/lib/Tooling/Tooling.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Tooling/Tooling.cpp b/clang/lib/Tooling/Tooling.cpp index cdb9bc71ee2..a121cd0fd64 100644 --- a/clang/lib/Tooling/Tooling.cpp +++ b/clang/lib/Tooling/Tooling.cpp @@ -236,8 +236,9 @@ void ToolInvocation::addFileMappingsTo(SourceManager &Sources) { ClangTool::ClangTool(const CompilationDatabase &Compilations, ArrayRef<std::string> SourcePaths) - : Files((FileSystemOptions())), - ArgsAdjusters(1, new ClangSyntaxOnlyAdjuster()) { + : Files((FileSystemOptions())) { + ArgsAdjusters.push_back(new ClangStripOutputAdjuster()); + ArgsAdjusters.push_back(new ClangSyntaxOnlyAdjuster()); for (unsigned I = 0, E = SourcePaths.size(); I != E; ++I) { SmallString<1024> File(getAbsolutePath(SourcePaths[I])); |