Follow-up for r261595: use range loop.

llvm-svn: 261597
This commit is contained in:
Michael Zolotukhin 2016-02-23 00:48:44 +00:00
parent b5ce11fcc6
commit 4fdf974e3e
1 changed files with 2 additions and 4 deletions

View File

@ -112,10 +112,8 @@ FoldBlockIntoPredecessor(BasicBlock *BB, LoopInfo *LI, ScalarEvolution *SE,
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);
}