aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/Dominators.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-08 01:22:54 +0000
committerChris Lattner <sabre@nondot.org>2009-09-08 01:22:54 +0000
commitd9ac5deabfa68d437de63461d45b9c2912f527b9 (patch)
tree38cdb2fc1a272bb082159d51616cfae54434613d /include/llvm/Analysis/Dominators.h
parent4a748b0f120835f4e83b77cfa761b504125ec817 (diff)
downloadexternal_llvm-d9ac5deabfa68d437de63461d45b9c2912f527b9.zip
external_llvm-d9ac5deabfa68d437de63461d45b9c2912f527b9.tar.gz
external_llvm-d9ac5deabfa68d437de63461d45b9c2912f527b9.tar.bz2
fix PR4915, a crash in -debug mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81177 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/Dominators.h')
-rw-r--r--include/llvm/Analysis/Dominators.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h
index 5d1e8ec..846bf1e 100644
--- a/include/llvm/Analysis/Dominators.h
+++ b/include/llvm/Analysis/Dominators.h
@@ -548,7 +548,9 @@ public:
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: