Fix a bad assertion to be correct . The root basic block can be used by PHI nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1370 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/PostDominators.cpp b/lib/Analysis/PostDominators.cpp
index c241646..2bc3edb 100644
--- a/lib/Analysis/PostDominators.cpp
+++ b/lib/Analysis/PostDominators.cpp
@@ -54,7 +54,9 @@
//
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!");
+ assert(Root->pred_begin() == Root->pred_end() &&
+ "Root node has predecessors in method!");
+
bool Changed;
do {
Changed = false;