diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-07-05 14:23:59 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-07-05 14:23:59 +0000 |
commit | c192b3dcffd5e672a2b2e1730e2440febb4fb192 (patch) | |
tree | ac719b5984165053bf83d71142e4d96b609b9784 /lib/Tooling/CompilationDatabase.cpp | |
parent | 2e645aa5697838f16ec570eb07c2bee7e13d0e0b (diff) | |
download | src-c192b3dcffd5e672a2b2e1730e2440febb4fb192.tar.gz src-c192b3dcffd5e672a2b2e1730e2440febb4fb192.zip |
Vendor import of clang trunk r241361:vendor/clang/clang-trunk-r241361
Notes
Notes:
svn path=/vendor/clang/dist/; revision=285165
svn path=/vendor/clang/clang-trunk-r241361/; revision=285166; tag=vendor/clang/clang-trunk-r241361
Diffstat (limited to 'lib/Tooling/CompilationDatabase.cpp')
-rw-r--r-- | lib/Tooling/CompilationDatabase.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/Tooling/CompilationDatabase.cpp b/lib/Tooling/CompilationDatabase.cpp index 4483b189ca9f..2272be632b9e 100644 --- a/lib/Tooling/CompilationDatabase.cpp +++ b/lib/Tooling/CompilationDatabase.cpp @@ -250,14 +250,11 @@ static bool stripPositionalArgs(std::vector<const char *> Args, CompileJobAnalyzer CompileAnalyzer; - for (const auto &Job : Jobs) { - if (Job.getKind() == driver::Job::CommandClass) { - const driver::Command &Cmd = cast<driver::Command>(Job); - // Collect only for Assemble jobs. If we do all jobs we get duplicates - // since Link jobs point to Assemble jobs as inputs. - if (Cmd.getSource().getKind() == driver::Action::AssembleJobClass) - CompileAnalyzer.run(&Cmd.getSource()); - } + for (const auto &Cmd : Jobs) { + // Collect only for Assemble jobs. If we do all jobs we get duplicates + // since Link jobs point to Assemble jobs as inputs. + if (Cmd.getSource().getKind() == driver::Action::AssembleJobClass) + CompileAnalyzer.run(&Cmd.getSource()); } if (CompileAnalyzer.Inputs.empty()) { |