diff options
author | Chris Lattner <sabre@nondot.org> | 2001-11-26 18:52:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-11-26 18:52:02 +0000 |
commit | ff5a8c43c9a299b133aeac6bae73959f4f94b19e (patch) | |
tree | 62a16c634e87c6323c49ae48feb23d50884fe2b0 /lib/VMCore/Dominators.cpp | |
parent | 25e9cad236c5ebb0f96f2c213c294616a1d04155 (diff) | |
download | external_llvm-ff5a8c43c9a299b133aeac6bae73959f4f94b19e.zip external_llvm-ff5a8c43c9a299b133aeac6bae73959f4f94b19e.tar.gz external_llvm-ff5a8c43c9a299b133aeac6bae73959f4f94b19e.tar.bz2 |
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
Diffstat (limited to 'lib/VMCore/Dominators.cpp')
-rw-r--r-- | lib/VMCore/Dominators.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/VMCore/Dominators.cpp b/lib/VMCore/Dominators.cpp index c241646..2bc3edb 100644 --- a/lib/VMCore/Dominators.cpp +++ b/lib/VMCore/Dominators.cpp @@ -54,7 +54,9 @@ 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!"); + assert(Root->pred_begin() == Root->pred_end() && + "Root node has predecessors in method!"); + bool Changed; do { Changed = false; |