Skip to content

Commit d01fdc9

Browse files
committed
[Profiler] Remove unnecessary forcing of constructors
We should always emit SILGen for user-written constructors, so this extra forcing logic is redundant.
1 parent bf9b4b9 commit d01fdc9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/SILGen/SILGen.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,8 +1459,6 @@ void SILGenModule::emitConstructor(ConstructorDecl *decl) {
14591459
SILDeclRef constant(decl);
14601460
DeclContext *declCtx = decl->getDeclContext();
14611461

1462-
bool ForCoverageMapping = doesASTRequireProfiling(M, decl);
1463-
14641462
if (declCtx->getSelfClassDecl()) {
14651463
// Designated initializers for classes, as well as @objc convenience
14661464
// initializers, have have separate entry points for allocation and
@@ -1470,8 +1468,7 @@ void SILGenModule::emitConstructor(ConstructorDecl *decl) {
14701468

14711469
if (decl->hasBody()) {
14721470
SILDeclRef initConstant(decl, SILDeclRef::Kind::Initializer);
1473-
emitOrDelayFunction(*this, initConstant,
1474-
/*forceEmission=*/ForCoverageMapping);
1471+
emitOrDelayFunction(*this, initConstant);
14751472
}
14761473

14771474
return;

0 commit comments

Comments
 (0)