summaryrefslogtreecommitdiff
path: root/include
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
commit45336a6f22de93b38d693fbdde0c96aa84f1e70f (patch)
tree38cdb2fc1a272bb082159d51616cfae54434613d /include
parentff1e98c72ae5f2aa805112925fd5c06049aa8e79 (diff)
downloadllvm-45336a6f22de93b38d693fbdde0c96aa84f1e70f.tar.gz
llvm-45336a6f22de93b38d693fbdde0c96aa84f1e70f.tar.bz2
llvm-45336a6f22de93b38d693fbdde0c96aa84f1e70f.tar.xz
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')
-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 5d1e8ecf12..846bf1e5f8 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: