Author: dpatel Date: Tue Aug 14 11:53:52 2007 New Revision: 41075 URL: http://llvm.org/viewvc/llvm-project?rev=41075&view=rev Log: Assert sooner. Fix wordings.
Modified: llvm/trunk/lib/VMCore/Dominators.cpp Modified: llvm/trunk/lib/VMCore/Dominators.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Dominators.cpp?rev=41075&r1=41074&r2=41075&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Dominators.cpp (original) +++ llvm/trunk/lib/VMCore/Dominators.cpp Tue Aug 14 11:53:52 2007 @@ -565,7 +565,8 @@ 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 @@ IDom->Children.erase(I); } - assert (Node->getChildren().empty() && "Children list is not empty"); - DomTreeNodes.erase(BB); delete Node; } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits