Skip to content

IRGen: Don't emit bodies of public_external transparent functions #13052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lib/IRGen/IRGenSIL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1473,10 +1473,9 @@ static void emitLocalSelfMetadata(IRGenSILFunction &IGF) {
void IRGenModule::emitSILFunction(SILFunction *f) {
if (f->isExternalDeclaration())
return;

// Do not emit bodies of public_external functions.
// The only exception is transparent functions.
if (hasPublicVisibility(f->getLinkage()) && f->isAvailableExternally() &&
!f->isTransparent())
if (hasPublicVisibility(f->getLinkage()) && f->isAvailableExternally())
return;

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

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