diff --git a/lib/IRGen/IRGenSIL.cpp b/lib/IRGen/IRGenSIL.cpp index be9e7f111e692..aa39ec39e618c 100644 --- a/lib/IRGen/IRGenSIL.cpp +++ b/lib/IRGen/IRGenSIL.cpp @@ -828,9 +828,7 @@ emitPHINodesForBBArgs(IRGenSILFunction &IGF, if (!silBB->empty()) { SILInstruction &I = *silBB->begin(); auto DS = I.getDebugScope(); - // FIXME: This should be an assertion. - if (!DS || (DS->SILFn != IGF.CurSILFn && !DS->InlinedCallSite)) - DS = IGF.CurSILFn->getDebugScope(); + assert(DS && (DS->SILFn == IGF.CurSILFn || DS->InlinedCallSite)); IGF.IGM.DebugInfo->setCurrentLoc(IGF.Builder, DS, I.getLoc()); } }