diff options
author | Tobias Grosser <grosser@fim.uni-passau.de> | 2009-11-30 12:06:37 +0000 |
---|---|---|
committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2009-11-30 12:06:37 +0000 |
commit | 6d6054ab3ef09773025dbcee2b923913a73a919d (patch) | |
tree | b8cd8a14b9cc4c337f78febb7fae922c23bcfc4e /include/llvm/Analysis/PostDominators.h | |
parent | e148e0b0e803768e12df1884159f143bf08f6e40 (diff) | |
download | external_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.h | 5 |
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) { |