Driver: convert a couple more instances to range based loops

More conversion to range based for loops rather than direct iterators with
dereferencing.  NFC.

llvm-svn: 224954
This commit is contained in:
Saleem Abdulrasool 2014-12-29 21:02:47 +00:00
parent 4c79845125
commit da3f4e5f35
1 changed files with 4 additions and 6 deletions

View File

@ -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);
}