aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Analysis/PostDominators.cpp1
-rw-r--r--lib/VMCore/Dominators.cpp1
2 files changed, 2 insertions, 0 deletions
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 @@ 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 24ff439..d349314 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;