diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp index e71e84feac41..c5b970704947 100644 --- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp +++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -169,8 +169,8 @@ bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, Pass *P) { if (DominatorTree *DT = P->getAnalysisIfAvailable()) { if (DomTreeNode *DTN = DT->getNode(BB)) { DomTreeNode *PredDTN = DT->getNode(PredBB); - SmallPtrSet Children(DTN->begin(), DTN->end()); - for (SmallPtrSet::iterator DI = Children.begin(), + SmallVector Children(DTN->begin(), DTN->end()); + for (SmallVector::iterator DI = Children.begin(), DE = Children.end(); DI != DE; ++DI) DT->changeImmediateDominator(*DI, PredDTN);