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 24ff439..d349314 100644
--- a/lib/Analysis/PostDominators.cpp
+++ b/lib/Analysis/PostDominators.cpp
@@ -53,6 +53,7 @@
//
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;