summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2007-04-21 07:04:45 +0000
committerOwen Anderson <resistor@mac.com>2007-04-21 07:04:45 +0000
commit94e1d9aa396d964ed7fe0b404e234f8ab22f4d77 (patch)
tree8e94d53b525b565dfb446f690a15618693c6b8b8 /llvm
parent6121802090c21c05e54676aaa7fa3ff21c013081 (diff)
downloadbcm5719-llvm-94e1d9aa396d964ed7fe0b404e234f8ab22f4d77.tar.gz
bcm5719-llvm-94e1d9aa396d964ed7fe0b404e234f8ab22f4d77.zip
Fix some null checks to actually test the part that needs checking.
llvm-svn: 36298
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Analysis/Dominators.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/include/llvm/Analysis/Dominators.h b/llvm/include/llvm/Analysis/Dominators.h
index 1d7e2f351c7..45eed7fcdaf 100644
--- a/llvm/include/llvm/Analysis/Dominators.h
+++ b/llvm/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;
OpenPOWER on IntegriCloud