summaryrefslogtreecommitdiff
path: root/lib/VMCore/Dominators.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-01-08 19:55:55 +0000
committerChris Lattner <sabre@nondot.org>2011-01-08 19:55:55 +0000
commit57863b8ee0d3adaaed60344bd6c63bace0436d60 (patch)
tree157e3f61c9bc6484d56b1065f177ea43230b3ada /lib/VMCore/Dominators.cpp
parent64c24db959815c6b7edbebd32e5a16936d75b2e1 (diff)
downloadllvm-57863b8ee0d3adaaed60344bd6c63bace0436d60.tar.gz
llvm-57863b8ee0d3adaaed60344bd6c63bace0436d60.tar.bz2
llvm-57863b8ee0d3adaaed60344bd6c63bace0436d60.tar.xz
make domtree verification print something useful on failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123078 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Dominators.cpp')
-rw-r--r--lib/VMCore/Dominators.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/VMCore/Dominators.cpp b/lib/VMCore/Dominators.cpp
index 19dda8cd70..2f080d3c55 100644
--- a/lib/VMCore/Dominators.cpp
+++ b/lib/VMCore/Dominators.cpp
@@ -68,7 +68,14 @@ void DominatorTree::verifyAnalysis() const {
DominatorTree OtherDT;
OtherDT.getBase().recalculate(F);
- assert(!compare(OtherDT) && "Invalid DominatorTree info!");
+ if (compare(OtherDT)) {
+ errs() << "DominatorTree is not up to date! Computed:\n";
+ print(errs());
+
+ errs() << "\nActual:\n";
+ OtherDT.print(errs());
+ abort();
+ }
}
void DominatorTree::print(raw_ostream &OS, const Module *) const {