forked from OSchip/llvm-project
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:
parent
4c79845125
commit
da3f4e5f35
|
@ -1382,9 +1382,8 @@ void Driver::BuildJobs(Compilation &C) const {
|
||||||
// files.
|
// files.
|
||||||
if (FinalOutput) {
|
if (FinalOutput) {
|
||||||
unsigned NumOutputs = 0;
|
unsigned NumOutputs = 0;
|
||||||
for (ActionList::const_iterator it = C.getActions().begin(),
|
for (const Action *A : C.getActions())
|
||||||
ie = C.getActions().end(); it != ie; ++it)
|
if (A->getType() != types::TY_Nothing)
|
||||||
if ((*it)->getType() != types::TY_Nothing)
|
|
||||||
++NumOutputs;
|
++NumOutputs;
|
||||||
|
|
||||||
if (NumOutputs > 1) {
|
if (NumOutputs > 1) {
|
||||||
|
@ -1580,8 +1579,7 @@ void Driver::BuildJobsForAction(Compilation &C,
|
||||||
|
|
||||||
// Only use pipes when there is exactly one input.
|
// Only use pipes when there is exactly one input.
|
||||||
InputInfoList InputInfos;
|
InputInfoList InputInfos;
|
||||||
for (ActionList::const_iterator it = Inputs->begin(), ie = Inputs->end();
|
for (const Action *Input : *Inputs) {
|
||||||
it != ie; ++it) {
|
|
||||||
// Treat dsymutil and verify sub-jobs as being at the top-level too, they
|
// Treat dsymutil and verify sub-jobs as being at the top-level too, they
|
||||||
// shouldn't get temporary output names.
|
// shouldn't get temporary output names.
|
||||||
// FIXME: Clean this up.
|
// FIXME: Clean this up.
|
||||||
|
@ -1590,7 +1588,7 @@ void Driver::BuildJobsForAction(Compilation &C,
|
||||||
SubJobAtTopLevel = true;
|
SubJobAtTopLevel = true;
|
||||||
|
|
||||||
InputInfo II;
|
InputInfo II;
|
||||||
BuildJobsForAction(C, *it, TC, BoundArch, SubJobAtTopLevel, MultipleArchs,
|
BuildJobsForAction(C, Input, TC, BoundArch, SubJobAtTopLevel, MultipleArchs,
|
||||||
LinkingOutput, II);
|
LinkingOutput, II);
|
||||||
InputInfos.push_back(II);
|
InputInfos.push_back(II);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue