Make sure noone branches to the entry node of the method
authorChris Lattner <sabre@nondot.org>
Fri, 24 Aug 2001 14:56:34 +0000 (14:56 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 24 Aug 2001 14:56:34 +0000 (14:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/PostDominators.cpp
lib/VMCore/Dominators.cpp

index 24ff43999427fa77e6d4d414253f9a1e0c7a1db5..d349314a1a958a28c1c7928d9bfaad250e47f606 100644 (file)
@@ -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;
index 24ff43999427fa77e6d4d414253f9a1e0c7a1db5..d349314a1a958a28c1c7928d9bfaad250e47f606 100644 (file)
@@ -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;