diff options
author | Owen Anderson <resistor@mac.com> | 2007-04-21 07:04:45 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2007-04-21 07:04:45 +0000 |
commit | 95b745a52eeb94a2be8ffa32e6d32aeadf3613cc (patch) | |
tree | a0dfe9e69a70ea14d5d60cd16cb26a0514b05986 | |
parent | e1d89558b486e27d483523a2e09ee6cf120ced21 (diff) | |
download | external_llvm-95b745a52eeb94a2be8ffa32e6d32aeadf3613cc.tar.gz external_llvm-95b745a52eeb94a2be8ffa32e6d32aeadf3613cc.tar.bz2 external_llvm-95b745a52eeb94a2be8ffa32e6d32aeadf3613cc.zip |
Fix some null checks to actually test the part that needs checking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36298 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Analysis/Dominators.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index 1d7e2f351c..45eed7fcda 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -323,16 +323,15 @@ public: /// Return the immediate dominator of A. BasicBlock *getIDom(BasicBlock *A) const { - if (!A) return 0; - 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) const { - if (!A) return; ETNode *NodeA = getNode(A); + if (!NodeA) return; const ETNode* son = NodeA->getSon(); if (!son) return; |