Skip to content

Commit c375910

Browse files
committed
Bugfix in dominator patching logic in mergeBasicBlockWithSuccessor.
1 parent 66b1830 commit c375910

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
@@ -757,7 +757,7 @@ bool swift::mergeBasicBlockWithSuccessor(SILBasicBlock *BB, DominanceInfo *DT,
757757
auto *BBNode = DT->getNode(BB);
758758
SmallVector<DominanceInfoNode *, 8> Children(SuccBBNode->begin(),
759759
SuccBBNode->end());
760-
for (auto *ChildNode : *SuccBBNode)
760+
for (auto *ChildNode : Children)
761761
DT->changeImmediateDominator(ChildNode, BBNode);
762762

763763
DT->eraseNode(SuccBB);

0 commit comments

Comments
 (0)