mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-25 04:39:51 +00:00
Assert sooner. Fix wordings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41075 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4d29ddfa06
commit
6d6403c287
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user