SIL: Allow package decls to be serialized when appropriate.

https://github.com/apple/swift/pull/70100 prohibited `package` declarations from
ever being serialized in order to solve a problem in which the declarations
were being serialized inappropriately. That's too heavy handed, though, because
an `@_alwaysEmitIntoClient` function with `package` access *must* be serialized
because it has public non-abi linkage.

Resolves rdar://104711625
This commit is contained in:
Allan Shortlidge
2023-12-18 15:04:19 -08:00
parent eda8f15e1d
commit d16d9799f2
2 changed files with 13 additions and 2 deletions

View File

@@ -844,7 +844,7 @@ IsSerialized_t SILDeclRef::isSerialized() const {
}
// Anything else that is not public is not serializable.
if (d->getEffectiveAccess() < AccessLevel::Public || d->hasPackageAccess())
if (d->getEffectiveAccess() < AccessLevel::Public)
return IsNotSerialized;
// Enum element constructors are serializable if the enum is