Skip to content

Commit 7e97baa

Browse files
committed
Assert that no SILInstruction is created without a SILDebugScope.
1 parent d756a69 commit 7e97baa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/SIL/SILBuilder.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ SILValue SILBuilder::emitObjCToThickMetatype(SILLocation Loc, SILValue Op,
288288
SILDebugLocation *
289289
SILBuilder::getOrCreateDebugLocation(SILLocation Loc, const SILDebugScope *DS) {
290290
// Check whether the location already exists.
291+
assert(DS && "empty debug scope");
291292
SILDebugLocation TmpLoc(Loc, DS);
292293
auto *&L = DebugLocs[SILDebugLocationID(TmpLoc)];
293294
if (L)

0 commit comments

Comments
 (0)