mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +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
|
// Add a new tree node for this BasicBlock, and link it as a child of
|
||||||
// IDomNode
|
// IDomNode
|
||||||
DomTreeNode *C = new DomTreeNode(BB, IPDomNode);
|
DomTreeNode *C = new DomTreeNode(BB, IPDomNode);
|
||||||
DomTreeNodes[BB] = C;
|
return DomTreeNodes[BB] = IPDomNode->addChild(C);
|
||||||
return BBNode = 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;
|
BasicBlock *NewBBIDom = 0;
|
||||||
unsigned i = 0;
|
unsigned i = 0;
|
||||||
for (i = 0; i < PredBlocks.size(); ++i)
|
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
|
// Add a new tree node for this BasicBlock, and link it as a child of
|
||||||
// IDomNode
|
// IDomNode
|
||||||
DomTreeNode *C = new DomTreeNode(BB, IDomNode);
|
DomTreeNode *C = new DomTreeNode(BB, IDomNode);
|
||||||
DomTreeNodes[BB] = C;
|
return DomTreeNodes[BB] = IDomNode->addChild(C);
|
||||||
return BBNode = IDomNode->addChild(C);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::ostream &operator<<(std::ostream &o,
|
static std::ostream &operator<<(std::ostream &o,
|
||||||
|
Loading…
Reference in New Issue
Block a user