Skip to content

Commit 75ecee2

Browse files
author
Mike Recachinas
committed
[IRGen] Add assertion to emitPHINodesForBBArgs
Converted the check that the DebugScope `DS` exists and that the DebugScope's `SILFn` is the same as the `IGF`'s to an assertion based on the FIXME's suggestion on line 831.
1 parent 578f137 commit 75ecee2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/IRGen/IRGenSIL.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -828,9 +828,7 @@ emitPHINodesForBBArgs(IRGenSILFunction &IGF,
828828
if (!silBB->empty()) {
829829
SILInstruction &I = *silBB->begin();
830830
auto DS = I.getDebugScope();
831-
// FIXME: This should be an assertion.
832-
if (!DS || (DS->SILFn != IGF.CurSILFn && !DS->InlinedCallSite))
833-
DS = IGF.CurSILFn->getDebugScope();
831+
assert(DS && (DS->SILFn == IGF.CurSILFn || DS->InlinedCallSite));
834832
IGF.IGM.DebugInfo->setCurrentLoc(IGF.Builder, DS, I.getLoc());
835833
}
836834
}

0 commit comments

Comments
 (0)