diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 0b5b86e80993..8475e20cedba 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -1382,9 +1382,8 @@ void Driver::BuildJobs(Compilation &C) const { // files. if (FinalOutput) { unsigned NumOutputs = 0; - for (ActionList::const_iterator it = C.getActions().begin(), - ie = C.getActions().end(); it != ie; ++it) - if ((*it)->getType() != types::TY_Nothing) + for (const Action *A : C.getActions()) + if (A->getType() != types::TY_Nothing) ++NumOutputs; if (NumOutputs > 1) { @@ -1580,8 +1579,7 @@ void Driver::BuildJobsForAction(Compilation &C, // Only use pipes when there is exactly one input. InputInfoList InputInfos; - for (ActionList::const_iterator it = Inputs->begin(), ie = Inputs->end(); - it != ie; ++it) { + for (const Action *Input : *Inputs) { // Treat dsymutil and verify sub-jobs as being at the top-level too, they // shouldn't get temporary output names. // FIXME: Clean this up. @@ -1590,7 +1588,7 @@ void Driver::BuildJobsForAction(Compilation &C, SubJobAtTopLevel = true; InputInfo II; - BuildJobsForAction(C, *it, TC, BoundArch, SubJobAtTopLevel, MultipleArchs, + BuildJobsForAction(C, Input, TC, BoundArch, SubJobAtTopLevel, MultipleArchs, LinkingOutput, II); InputInfos.push_back(II); }