[llvm-commits] [llvm] r81177 - /llvm/trunk/include/llvm/Analysis/Dominators.h

Chris Lattner sabre at nondot.org
Mon Sep 7 18:22:54 PDT 2009


Author: lattner
Date: Mon Sep  7 20:22:54 2009
New Revision: 81177

URL: http://llvm.org/viewvc/llvm-project?rev=81177&view=rev
Log:
fix PR4915, a crash in -debug mode.

Modified:
    llvm/trunk/include/llvm/Analysis/Dominators.h

Modified: llvm/trunk/include/llvm/Analysis/Dominators.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/Dominators.h?rev=81177&r1=81176&r2=81177&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Analysis/Dominators.h (original)
+++ llvm/trunk/include/llvm/Analysis/Dominators.h Mon Sep  7 20:22:54 2009
@@ -548,7 +548,9 @@
       o << "DFSNumbers invalid: " << SlowQueries << " slow queries.";
     o << "\n";
 
-    PrintDomTree<NodeT>(getRootNode(), o, 1);
+    // The postdom tree can have a null root if there are no returns.
+    if (getRootNode())
+      PrintDomTree<NodeT>(getRootNode(), o, 1);
   }
 
 protected:





More information about the llvm-commits mailing list