From 0cd9248d9e1c4a35ea7633a11de3fb394b48f452 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Thu, 2 Jul 2015 22:52:08 +0000 Subject: Driver: Remove the Job class. NFC We had a strange relationship here where we made a list of Jobs inherit from a single Job, but there weren't actually any places where this arbitrary nesting was used or needed. Simplify all of this by removing Job entirely and updating all of the users to either work with a JobList or a single Command. llvm-svn: 241310 --- clang/lib/Tooling/CompilationDatabase.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'clang/lib/Tooling/CompilationDatabase.cpp') diff --git a/clang/lib/Tooling/CompilationDatabase.cpp b/clang/lib/Tooling/CompilationDatabase.cpp index 4483b18..2272be6 100644 --- a/clang/lib/Tooling/CompilationDatabase.cpp +++ b/clang/lib/Tooling/CompilationDatabase.cpp @@ -250,14 +250,11 @@ static bool stripPositionalArgs(std::vector Args, CompileJobAnalyzer CompileAnalyzer; - for (const auto &Job : Jobs) { - if (Job.getKind() == driver::Job::CommandClass) { - const driver::Command &Cmd = cast(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()) { -- cgit v1.1