mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 23:18:51 +00:00
Add null checks and const-ify these accessors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36270 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ac79c9e6e0
commit
13e3a292c5
@ -322,13 +322,16 @@ public:
|
||||
}
|
||||
|
||||
/// Return the immediate dominator of A.
|
||||
BasicBlock *getIDom(BasicBlock *A) {
|
||||
BasicBlock *getIDom(BasicBlock *A) const {
|
||||
if (!A) return 0;
|
||||
|
||||
ETNode *NodeA = getNode(A);
|
||||
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 {
|
||||
if (!A) return;
|
||||
ETNode *NodeA = getNode(A);
|
||||
const ETNode* son = NodeA->getSon();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user