mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-11 13:37:07 +00:00
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
3178b8abbc
commit
2233d8b00a
@ -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
Block a user