[llvm] r261597 - Follow-up for r261595: use range loop.
Michael Zolotukhin via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 22 16:48:45 PST 2016
Author: mzolotukhin
Date: Mon Feb 22 18:48:44 2016
New Revision: 261597
URL: http://llvm.org/viewvc/llvm-project?rev=261597&view=rev
Log:
Follow-up for r261595: use range loop.
Modified:
llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp
Modified: llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp?rev=261597&r1=261596&r2=261597&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp Mon Feb 22 18:48:44 2016
@@ -112,10 +112,8 @@ FoldBlockIntoPredecessor(BasicBlock *BB,
if (DomTreeNode *DTN = DT->getNode(BB)) {
DomTreeNode *PredDTN = DT->getNode(OnlyPred);
SmallVector<DomTreeNode *, 8> Children(DTN->begin(), DTN->end());
- for (SmallVectorImpl<DomTreeNode *>::iterator DI = Children.begin(),
- DE = Children.end();
- DI != DE; ++DI)
- DT->changeImmediateDominator(*DI, PredDTN);
+ for (auto DI : Children)
+ DT->changeImmediateDominator(DI, PredDTN);
DT->eraseNode(BB);
}
More information about the llvm-commits
mailing list