aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/PostDominators.h
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2009-11-30 12:06:37 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2009-11-30 12:06:37 +0000
commit6d6054ab3ef09773025dbcee2b923913a73a919d (patch)
treeb8cd8a14b9cc4c337f78febb7fae922c23bcfc4e /include/llvm/Analysis/PostDominators.h
parente148e0b0e803768e12df1884159f143bf08f6e40 (diff)
downloadexternal_llvm-6d6054ab3ef09773025dbcee2b923913a73a919d.zip
external_llvm-6d6054ab3ef09773025dbcee2b923913a73a919d.tar.gz
external_llvm-6d6054ab3ef09773025dbcee2b923913a73a919d.tar.bz2
Small PostDominatorTree improvements
* Do not SEGFAULT if tree entryNode() is NULL * Print function names in dotty printer git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90130 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/PostDominators.h')
-rw-r--r--include/llvm/Analysis/PostDominators.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/Analysis/PostDominators.h b/include/llvm/Analysis/PostDominators.h
index 42a16e7..ea14b2d 100644
--- a/include/llvm/Analysis/PostDominators.h
+++ b/include/llvm/Analysis/PostDominators.h
@@ -81,7 +81,10 @@ template <> struct GraphTraits<PostDominatorTree*>
}
static nodes_iterator nodes_begin(PostDominatorTree *N) {
- return df_begin(getEntryNode(N));
+ if (getEntryNode(N))
+ return df_begin(getEntryNode(N));
+ else
+ return df_end(getEntryNode(N));
}
static nodes_iterator nodes_end(PostDominatorTree *N) {