From 75ecee2d3cf13db09854df2a9d0da35c90992546 Mon Sep 17 00:00:00 2001 From: Mike Recachinas Date: Fri, 4 Dec 2015 15:43:30 -0500 Subject: [PATCH] [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. --- lib/IRGen/IRGenSIL.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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()); } }