Skip to content

Commit 99cfbf7

Browse files
committed
[SILGen] TypeWrappers: switch to emitFunctionDefinition for forced memberwise/default inits
1 parent daa8d5b commit 99cfbf7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/SILGen/SILGen.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,12 +1439,11 @@ void SILGenModule::emitConstructor(ConstructorDecl *decl) {
14391439
(decl->isMemberwiseInitializer() ||
14401440
decl == SD->getDefaultInitializer())) {
14411441
#ifndef NDEBUG
1442-
auto *wrapped = SD->getDeclContext()->getSelfNominalTypeDecl();
1443-
assert(wrapped->hasTypeWrapper());
1442+
auto *wrapped = SD->getDeclContext()->getSelfNominalTypeDecl();
1443+
assert(wrapped->hasTypeWrapper());
14441444
#endif
14451445

1446-
emitOrDelayFunction(*this, constant,
1447-
/*forceEmission=*/true);
1446+
emitFunctionDefinition(constant, getFunction(constant, ForDefinition));
14481447
return;
14491448
}
14501449
}

0 commit comments

Comments
 (0)