Skip to content

Commit 824b1f3

Browse files
committed
IRGen: Don't emit bodies of public_external transparent functions
This is another holdover from when transparent functions had special treatment.
1 parent 115a362 commit 824b1f3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/IRGen/IRGenSIL.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,10 +1473,9 @@ static void emitLocalSelfMetadata(IRGenSILFunction &IGF) {
14731473
void IRGenModule::emitSILFunction(SILFunction *f) {
14741474
if (f->isExternalDeclaration())
14751475
return;
1476+
14761477
// Do not emit bodies of public_external functions.
1477-
// The only exception is transparent functions.
1478-
if (hasPublicVisibility(f->getLinkage()) && f->isAvailableExternally() &&
1479-
!f->isTransparent())
1478+
if (hasPublicVisibility(f->getLinkage()) && f->isAvailableExternally())
14801479
return;
14811480

14821481
PrettyStackTraceSILFunction stackTrace("emitting IR", f);
@@ -5097,7 +5096,6 @@ void IRGenSILFunction::visitDestroyAddrInst(swift::DestroyAddrInst *i) {
50975096
SILType addrTy = i->getOperand()->getType();
50985097
const TypeInfo &addrTI = getTypeInfo(addrTy);
50995098

5100-
// Otherwise, do the normal thing.
51015099
Address base = getLoweredAddress(i->getOperand());
51025100
addrTI.destroy(*this, base, addrTy, false /*isOutlined*/);
51035101
}

0 commit comments

Comments
 (0)