Skip to content

Commit 5e4bb4b

Browse files
committedDec 4, 2015
Merge pull request #207 from mrecachinas/irgensil-assertion
[IRGen] Add assertion to `emitPHINodesForBBArgs`
2 parents da0bac1 + 75ecee2 commit 5e4bb4b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

Diff for: ‎lib/IRGen/IRGenSIL.cpp

+1-3
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)
Please sign in to comment.