Skip to content

[SIL] Fix non_abi functions missing [serialized] in SILFunctionBuilder#90532

Open
AlexsanderDamaceno wants to merge 1 commit into
swiftlang:mainfrom
AlexsanderDamaceno:sil-fix-non-abi-serialized
Open

[SIL] Fix non_abi functions missing [serialized] in SILFunctionBuilder#90532
AlexsanderDamaceno wants to merge 1 commit into
swiftlang:mainfrom
AlexsanderDamaceno:sil-fix-non-abi-serialized

Conversation

@AlexsanderDamaceno

@AlexsanderDamaceno AlexsanderDamaceno commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Bug analysis:

getDefinitionLinkage() and getSerializedKind() can disagree for @export(implementation) linkage becomes PublicNonABI but serialized kind is IsNotSerialized because getSerializedKind() caps effective access to internal when the enclosing type is not public, returning early without considering the linkage.

Solution in this patch:

Add a consistency check in getOrCreateFunction() that forces [serialized] on any PublicNonABI/PackageNonABI function

Filled bug: #90225

@AlexsanderDamaceno AlexsanderDamaceno force-pushed the sil-fix-non-abi-serialized branch from 01a4627 to 876aa1b Compare July 9, 2026 06:51
getDefinitionLinkage() and getSerializedKind() can disagree for
@export(implementation): linkage becomes PublicNonABI but serialized
kind is IsNotSerialized because getSerializedKind() caps effective
access to internal when the enclosing type is not public, returning
early without considering the linkage.

Add a consistency check in getOrCreateFunction() that forces
[serialized] on any PublicNonABI/PackageNonABI function, covering
both the new-function and HiddenExternal-promotion paths.
@AlexsanderDamaceno AlexsanderDamaceno force-pushed the sil-fix-non-abi-serialized branch from 876aa1b to 8d4232a Compare July 9, 2026 06:53
@AlexsanderDamaceno

Copy link
Copy Markdown
Contributor Author

@eeckstein @jckarter could take a look at this one ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant