mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Do not segfault when the post-dominator tree is empty (ie, there are no return
or unwind instructions in the function) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8537 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3a49a6b5b8
commit
c72b249e9c
@ -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