forked from OSchip/llvm-project
Do not segfault when the post-dominator tree is empty (ie, there are no return
or unwind instructions in the function) llvm-svn: 8537
This commit is contained in:
parent
0fead45c59
commit
b12f83e101
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue