aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Tooling/CompilationDatabase.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2015-07-02 22:52:08 +0000
committerJustin Bogner <mail@justinbogner.com>2015-07-02 22:52:08 +0000
commit0cd9248d9e1c4a35ea7633a11de3fb394b48f452 (patch)
tree1230089592673217be3821c094d26745ae06d150 /clang/lib/Tooling/CompilationDatabase.cpp
parent94817612e2b45c3e447399359aa117f386ab58c4 (diff)
downloadllvm-0cd9248d9e1c4a35ea7633a11de3fb394b48f452.zip
llvm-0cd9248d9e1c4a35ea7633a11de3fb394b48f452.tar.gz
llvm-0cd9248d9e1c4a35ea7633a11de3fb394b48f452.tar.bz2
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
Diffstat (limited to 'clang/lib/Tooling/CompilationDatabase.cpp')
-rw-r--r--clang/lib/Tooling/CompilationDatabase.cpp13
1 files changed, 5 insertions, 8 deletions
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<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()) {