Skip to content

Commit 90bc9a1

Browse files
committed
[SILGen] Add assert to emitApplyAllocatingInitializer
Make sure we reliably assert in release builds if `getBuiltinInitDecl` passes a null value here.
1 parent 7821c2c commit 90bc9a1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/SILGen/SILGenApply.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6920,6 +6920,7 @@ RValue SILGenFunction::emitApplyAllocatingInitializer(SILLocation loc,
69206920
PreparedArguments &&args,
69216921
Type overriddenSelfType,
69226922
SGFContext C) {
6923+
ASSERT(init);
69236924
ConstructorDecl *ctor = cast<ConstructorDecl>(init.getDecl());
69246925

69256926
// Form the reference to the allocating initializer.

0 commit comments

Comments
 (0)