Skip to content

Commit c413604

Browse files
committed
Bugfix in dominator patching logic in mergeBasicBlockWithSuccessor.
1 parent cb68e2e commit c413604

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SILOptimizer/Utils/CFG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ bool swift::mergeBasicBlockWithSuccessor(SILBasicBlock *BB, DominanceInfo *DT,
822822
auto *BBNode = DT->getNode(BB);
823823
SmallVector<DominanceInfoNode *, 8> Children(SuccBBNode->begin(),
824824
SuccBBNode->end());
825-
for (auto *ChildNode : *SuccBBNode)
825+
for (auto *ChildNode : Children)
826826
DT->changeImmediateDominator(ChildNode, BBNode);
827827

828828
DT->eraseNode(SuccBB);

0 commit comments

Comments
 (0)