mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Remove 'default argument resilience expansion'
This was a Swift 3 mode holdover.
This commit is contained in:
@@ -476,19 +476,13 @@ IsSerialized_t SILDeclRef::isSerialized() const {
|
||||
// Default argument generators are serialized if the containing
|
||||
// declaration is public.
|
||||
if (isDefaultArgGenerator()) {
|
||||
ResilienceExpansion expansion;
|
||||
if (auto *EED = dyn_cast<EnumElementDecl>(d)) {
|
||||
expansion = EED->getDefaultArgumentResilienceExpansion();
|
||||
} else {
|
||||
expansion = cast<AbstractFunctionDecl>(d)
|
||||
->getDefaultArgumentResilienceExpansion();
|
||||
}
|
||||
switch (expansion) {
|
||||
case ResilienceExpansion::Minimal:
|
||||
auto scope =
|
||||
d->getFormalAccessScope(/*useDC=*/nullptr,
|
||||
/*treatUsableFromInlineAsPublic=*/true);
|
||||
|
||||
if (scope.isPublic())
|
||||
return IsSerialized;
|
||||
case ResilienceExpansion::Maximal:
|
||||
return IsNotSerialized;
|
||||
}
|
||||
return IsNotSerialized;
|
||||
}
|
||||
|
||||
// Stored property initializers are inlinable if the type is explicitly
|
||||
|
||||
Reference in New Issue
Block a user