}
/// Return the immediate dominator of A.
- BasicBlock *getIDom(BasicBlock *A) {
+ BasicBlock *getIDom(BasicBlock *A) const {
ETNode *NodeA = getNode(A);
+ if (!NodeA) return 0;
const ETNode *idom = NodeA->getFather();
return idom ? idom->getData<BasicBlock>() : 0;
}
- void getChildren(BasicBlock *A, std::vector<BasicBlock*>& children) {
+ void getChildren(BasicBlock *A, std::vector<BasicBlock*>& children) const {
ETNode *NodeA = getNode(A);
+ if (!NodeA) return;
const ETNode* son = NodeA->getSon();
if (!son) return;