From: Chris Lattner Date: Fri, 24 Aug 2001 14:56:34 +0000 (+0000) Subject: Make sure noone branches to the entry node of the method X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=1b5499bbb82848ee7d5d5a9062eb97b63fd9c5c6;p=oota-llvm.git Make sure noone branches to the entry node of the method git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/PostDominators.cpp b/lib/Analysis/PostDominators.cpp index 24ff4399942..d349314a1a9 100644 --- a/lib/Analysis/PostDominators.cpp +++ b/lib/Analysis/PostDominators.cpp @@ -53,6 +53,7 @@ cfg::DominatorSet::DominatorSet(const Method *M) : DominatorBase(M->front()) { // void cfg::DominatorSet::calcForwardDominatorSet(const Method *M) { assert(Root && M && "Can't build dominator set of null method!"); + assert(Root->use_size() == 0 && "Root node has predecessors in method!"); bool Changed; do { Changed = false; diff --git a/lib/VMCore/Dominators.cpp b/lib/VMCore/Dominators.cpp index 24ff4399942..d349314a1a9 100644 --- a/lib/VMCore/Dominators.cpp +++ b/lib/VMCore/Dominators.cpp @@ -53,6 +53,7 @@ cfg::DominatorSet::DominatorSet(const Method *M) : DominatorBase(M->front()) { // void cfg::DominatorSet::calcForwardDominatorSet(const Method *M) { assert(Root && M && "Can't build dominator set of null method!"); + assert(Root->use_size() == 0 && "Root node has predecessors in method!"); bool Changed; do { Changed = false;