diff options
-rw-r--r-- | include/llvm/Analysis/PostDominators.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Analysis/PostDominators.h b/include/llvm/Analysis/PostDominators.h index f7131f2a45..8463136ea1 100644 --- a/include/llvm/Analysis/PostDominators.h +++ b/include/llvm/Analysis/PostDominators.h @@ -88,7 +88,8 @@ struct PostDominanceFrontier : public DominanceFrontierBase { Frontiers.clear(); PostDominatorTree &DT = getAnalysis<PostDominatorTree>(); Roots = DT.getRoots(); - calculate(DT, DT.getRootNode()); + if (const DominatorTree::Node *Root = DT.getRootNode()) + calculate(DT, Root); return false; } |