mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
In some cases, the "fail BB dominator" may be null after the BB was split (and
becomes reachable when before it wasn't). Check to make sure that it's not null before trying to use it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128434 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -221,7 +221,8 @@ bool StackProtector::InsertStackProtectors() {
|
||||
BasicBlock *NewBB = BB->splitBasicBlock(RI, "SP_return");
|
||||
if (DT && DT->isReachableFromEntry(BB)) {
|
||||
DT->addNewBlock(NewBB, BB);
|
||||
FailBBDom = DT->findNearestCommonDominator(FailBBDom, BB);
|
||||
if (FailBBDom)
|
||||
FailBBDom = DT->findNearestCommonDominator(FailBBDom, BB);
|
||||
}
|
||||
|
||||
// Remove default branch instruction to the new BB.
|
||||
|
Reference in New Issue
Block a user