mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
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
This commit is contained in:
@@ -323,16 +323,15 @@ public:
|
|||||||
|
|
||||||
/// Return the immediate dominator of A.
|
/// Return the immediate dominator of A.
|
||||||
BasicBlock *getIDom(BasicBlock *A) const {
|
BasicBlock *getIDom(BasicBlock *A) const {
|
||||||
if (!A) return 0;
|
|
||||||
|
|
||||||
ETNode *NodeA = getNode(A);
|
ETNode *NodeA = getNode(A);
|
||||||
|
if (!NodeA) return 0;
|
||||||
const ETNode *idom = NodeA->getFather();
|
const ETNode *idom = NodeA->getFather();
|
||||||
return idom ? idom->getData<BasicBlock>() : 0;
|
return idom ? idom->getData<BasicBlock>() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void getChildren(BasicBlock *A, std::vector<BasicBlock*>& children) const {
|
void getChildren(BasicBlock *A, std::vector<BasicBlock*>& children) const {
|
||||||
if (!A) return;
|
|
||||||
ETNode *NodeA = getNode(A);
|
ETNode *NodeA = getNode(A);
|
||||||
|
if (!NodeA) return;
|
||||||
const ETNode* son = NodeA->getSon();
|
const ETNode* son = NodeA->getSon();
|
||||||
|
|
||||||
if (!son) return;
|
if (!son) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user