Driver: Use pointee_iterator rather than iterating over unique_ptrs
There's probably never a good reason to iterate over unique_ptrs. This lets us use range-for and say Job.foo instead of (*it)->foo in a few places. llvm-svn: 218938
This commit is contained in:
@@ -249,10 +249,9 @@ static bool stripPositionalArgs(std::vector<const char *> Args,
|
||||
|
||||
CompileJobAnalyzer CompileAnalyzer;
|
||||
|
||||
for (driver::JobList::const_iterator I = Jobs.begin(), E = Jobs.end(); I != E;
|
||||
++I) {
|
||||
if ((*I)->getKind() == driver::Job::CommandClass) {
|
||||
const driver::Command &Cmd = cast<driver::Command>(**I);
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user