diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-12-29 21:02:47 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-12-29 21:02:47 +0000 |
commit | da3f4e5f3582c7bb5f20246e215137a8ace76e94 (patch) | |
tree | bb9375352ace34ede00d72eb6baee1d7cba7ed5c | |
parent | 4c79845125604abf73441e30c29188849b575979 (diff) | |
download | bcm5719-llvm-da3f4e5f3582c7bb5f20246e215137a8ace76e94.tar.gz bcm5719-llvm-da3f4e5f3582c7bb5f20246e215137a8ace76e94.zip |
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
-rw-r--r-- | clang/lib/Driver/Driver.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 0b5b86e8099..8475e20cedb 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); } |