@@ -461,7 +461,7 @@ static LinkageLimit getLinkageLimit(SILDeclRef constant) {
461461 return Limit::OnDemand;
462462
463463 case Kind::GlobalAccessor:
464- return ! cast<VarDecl>(d)->isFragile () ? Limit::NeverPublic : Limit::None;
464+ return cast<VarDecl>(d)->isStrictlyResilient () ? Limit::NeverPublic : Limit::None;
465465
466466 case Kind::DefaultArgGenerator:
467467 // If the default argument is to be serialized, only use non-ABI public
@@ -507,8 +507,7 @@ static LinkageLimit getLinkageLimit(SILDeclRef constant) {
507507 return Limit::AlwaysEmitIntoClient;
508508
509509 // FIXME: This should always be true.
510- if (d->getModuleContext ()->isResilient () &&
511- !d->getModuleContext ()->allowNonResilientAccess ())
510+ if (d->getModuleContext ()->isStrictlyResilient ())
512511 return Limit::NeverPublic;
513512
514513 break ;
@@ -1529,11 +1528,10 @@ SubclassScope SILDeclRef::getSubclassScope() const {
15291528 // FIXME: This is too narrow. Any class with resilient metadata should
15301529 // probably have this, at least for method overrides that don't add new
15311530 // vtable entries.
1532- bool isResilientClass = classType->isResilient () &&
1533- !classType->getModuleContext ()->allowNonResilientAccess ();
1531+ bool isStrictResilientClass = classType->isStrictlyResilient ();
15341532
15351533 if (auto *CD = dyn_cast<ConstructorDecl>(decl)) {
1536- if (isResilientClass )
1534+ if (isStrictResilientClass )
15371535 return SubclassScope::NotApplicable;
15381536 // Initializing entry points do not appear in the vtable.
15391537 if (kind == SILDeclRef::Kind::Initializer)
@@ -1564,14 +1562,14 @@ SubclassScope SILDeclRef::getSubclassScope() const {
15641562 // In the resilient case, we're going to be making symbols _less_
15651563 // visible, so make sure we stop now; final methods can always be
15661564 // called directly.
1567- if (isResilientClass )
1565+ if (isStrictResilientClass )
15681566 return SubclassScope::Internal;
15691567 }
15701568
15711569 assert (decl->getEffectiveAccess () <= classType->getEffectiveAccess () &&
15721570 " class must be as visible as its members" );
15731571
1574- if (isResilientClass ) {
1572+ if (isStrictResilientClass ) {
15751573 // The symbol should _only_ be reached via the vtable, so we're
15761574 // going to make it hidden.
15771575 return SubclassScope::Resilient;
0 commit comments