[llvm-commits] [llvm] r123078 - /llvm/trunk/lib/VMCore/Dominators.cpp
Chris Lattner
sabre at nondot.org
Sat Jan 8 11:55:55 PST 2011
Author: lattner
Date: Sat Jan 8 13:55:55 2011
New Revision: 123078
URL: http://llvm.org/viewvc/llvm-project?rev=123078&view=rev
Log:
make domtree verification print something useful on failure.
Modified:
llvm/trunk/lib/VMCore/Dominators.cpp
Modified: llvm/trunk/lib/VMCore/Dominators.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Dominators.cpp?rev=123078&r1=123077&r2=123078&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Dominators.cpp (original)
+++ llvm/trunk/lib/VMCore/Dominators.cpp Sat Jan 8 13:55:55 2011
@@ -68,7 +68,14 @@
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 {
More information about the llvm-commits
mailing list