diff options
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) { |