diff options
author | Chris Lattner <sabre@nondot.org> | 2007-08-05 00:24:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-08-05 00:24:30 +0000 |
commit | 8be9adb22058a5033b0b30f6ae3eeb32eea13648 (patch) | |
tree | 5c5a936ad45f9a5281fa52a50490a07523b061d3 /lib/VMCore/Dominators.cpp | |
parent | 33607b07a8b62745f687ca849e7e796ad76e1baf (diff) | |
download | external_llvm-8be9adb22058a5033b0b30f6ae3eeb32eea13648.zip external_llvm-8be9adb22058a5033b0b30f6ae3eeb32eea13648.tar.gz external_llvm-8be9adb22058a5033b0b30f6ae3eeb32eea13648.tar.bz2 |
Fix an iterator invalidation bug I induced.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40830 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Dominators.cpp')
-rw-r--r-- | lib/VMCore/Dominators.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VMCore/Dominators.cpp b/lib/VMCore/Dominators.cpp index 7d0fbaa..8981ee7 100644 --- a/lib/VMCore/Dominators.cpp +++ b/lib/VMCore/Dominators.cpp @@ -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, |