summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit5f7734c4a5c82136fb6557b18c40401f38591cf1 (patch)
treef708db5c4c14196282366fd853cc22c50058e7ac /llvm/lib/VMCore/Dominators.cpp
parent30f318e5d135164dc4c0125e162b02aa192b0092 (diff)
downloadbcm5719-llvm-5f7734c4a5c82136fb6557b18c40401f38591cf1.tar.gz
bcm5719-llvm-5f7734c4a5c82136fb6557b18c40401f38591cf1.zip
make domtree verification print something useful on failure.
llvm-svn: 123078
Diffstat (limited to 'llvm/lib/VMCore/Dominators.cpp')
-rw-r--r--llvm/lib/VMCore/Dominators.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/Dominators.cpp b/llvm/lib/VMCore/Dominators.cpp
index 19dda8cd709..2f080d3c55d 100644
--- a/llvm/lib/VMCore/Dominators.cpp
+++ b/llvm/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 {
OpenPOWER on IntegriCloud