make domtree verification print something useful on failure.
authorChris Lattner <sabre@nondot.org>
Sat, 8 Jan 2011 19:55:55 +0000 (19:55 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 8 Jan 2011 19:55:55 +0000 (19:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123078 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Dominators.cpp

index 19dda8cd709f86a9deee18822729d6e98be34595..2f080d3c55d424d2194bfbe161831f37ef87f3ce 100644 (file)
@@ -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 {