mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-20 02:58:10 +00:00
Fix an iterator invalidation bug I induced.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40830 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2f0d1ea864
commit
a31965301d
@ -217,8 +217,7 @@ DomTreeNode *PostDominatorTree::getNodeForBlock(BasicBlock *BB) {
|
||||
// Add a new tree node for this BasicBlock, and link it as a child of
|
||||
// IDomNode
|
||||
DomTreeNode *C = new DomTreeNode(BB, IPDomNode);
|
||||
DomTreeNodes[BB] = C;
|
||||
return BBNode = IPDomNode->addChild(C);
|
||||
return DomTreeNodes[BB] = IPDomNode->addChild(C);
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -120,7 +120,8 @@ void DominatorTree::splitBlock(BasicBlock *NewBB) {
|
||||
}
|
||||
|
||||
|
||||
// Find NewBB's immediate dominator and create new dominator tree node for NewBB.
|
||||
// Find NewBB's immediate dominator and create new dominator tree node for
|
||||
// NewBB.
|
||||
BasicBlock *NewBBIDom = 0;
|
||||
unsigned i = 0;
|
||||
for (i = 0; i < PredBlocks.size(); ++i)
|
||||
@ -552,8 +553,7 @@ DomTreeNode *DominatorTree::getNodeForBlock(BasicBlock *BB) {
|
||||
// Add a new tree node for this BasicBlock, and link it as a child of
|
||||
// IDomNode
|
||||
DomTreeNode *C = new DomTreeNode(BB, IDomNode);
|
||||
DomTreeNodes[BB] = C;
|
||||
return BBNode = IDomNode->addChild(C);
|
||||
return DomTreeNodes[BB] = IDomNode->addChild(C);
|
||||
}
|
||||
|
||||
static std::ostream &operator<<(std::ostream &o,
|
||||
|
Loading…
Reference in New Issue
Block a user