diff options
author | Devang Patel <dpatel@apple.com> | 2007-08-14 16:53:52 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-08-14 16:53:52 +0000 |
commit | 6d6403c2876ac87b8e51c166e0da8338bfe011f5 (patch) | |
tree | e9e540c43f3d379797e522ccbe5c5cda0949d9d4 /lib/VMCore | |
parent | 4d29ddfa06c111dbea5d27339c1c06191922c0fd (diff) | |
download | external_llvm-6d6403c2876ac87b8e51c166e0da8338bfe011f5.zip external_llvm-6d6403c2876ac87b8e51c166e0da8338bfe011f5.tar.gz external_llvm-6d6403c2876ac87b8e51c166e0da8338bfe011f5.tar.bz2 |
Assert sooner. Fix wordings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41075 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Dominators.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/VMCore/Dominators.cpp b/lib/VMCore/Dominators.cpp index d292e08..bfba3e2 100644 --- a/lib/VMCore/Dominators.cpp +++ b/lib/VMCore/Dominators.cpp @@ -565,7 +565,8 @@ static void PrintDomTree(const DomTreeNode *N, std::ostream &o, void DominatorTreeBase::eraseNode(BasicBlock *BB) { DomTreeNode *Node = getNode(BB); assert (Node && "Removing node that isn't in dominator tree."); - + assert (Node->getChildren().empty() && "Node is not a leaf node."); + // Remove node from immediate dominator's children list. DomTreeNode *IDom = Node->getIDom(); if (IDom) { @@ -577,8 +578,6 @@ void DominatorTreeBase::eraseNode(BasicBlock *BB) { IDom->Children.erase(I); } - assert (Node->getChildren().empty() && "Children list is not empty"); - DomTreeNodes.erase(BB); delete Node; } |