Add ability to remove nodes from DominatorTree, for when a BasicBlock

is being removed.

llvm-svn: 30270
This commit is contained in:
Nick Lewycky 2006-09-12 00:18:28 +00:00
parent 525974551b
commit a2c3d7b1ca

View File

@ -399,6 +399,14 @@ public:
N->setIDom(NewIDom);
}
/// removeNode - Removes a node from the dominator tree. Block must not
/// dominate any other blocks. Invalidates any node pointing to removed
/// block.
void removeNode(BasicBlock *BB) {
assert(getNode(BB) && "Removing node that isn't in dominator tree.");
Nodes.erase(BB);
}
/// print - Convert to human readable form
///
virtual void print(std::ostream &OS, const Module* = 0) const;