File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -599,18 +599,16 @@ class SILSymbolVisitorImpl : public ASTVisitor<SILSymbolVisitorImpl> {
599
599
}
600
600
601
601
// Statically/globally stored variables have some special handling.
602
- // Global accessor gets no linkage limit in the same resilience domain,
603
- // e.g. in package with non-resilient access optimizations enabled,
604
- // so it should be added in such case.
605
- if (!VD->isResilient () ||
606
- VD->getModuleContext ()->allowNonResilientAccess ()) {
607
- if (VD->hasStorage () && isGlobalOrStaticVar (VD)) {
608
- if (!shouldSkipVisit (getDeclLinkage (VD))) {
609
- Visitor.addGlobalVar (VD);
610
- }
611
- if (VD->isLazilyInitializedGlobal ())
612
- addFunction (SILDeclRef (VD, SILDeclRef::Kind::GlobalAccessor));
602
+ // Global accessor should get no linkage limit thus get non-hidden
603
+ // linkage in the same resilience domain, e.g. in the same package,
604
+ // so add them regardless of whether modules are built resiliently
605
+ // or not.
606
+ if (VD->hasStorage () && isGlobalOrStaticVar (VD)) {
607
+ if (!shouldSkipVisit (getDeclLinkage (VD))) {
608
+ Visitor.addGlobalVar (VD);
613
609
}
610
+ if (VD->isLazilyInitializedGlobal ())
611
+ addFunction (SILDeclRef (VD, SILDeclRef::Kind::GlobalAccessor));
614
612
}
615
613
616
614
visitAbstractStorageDecl (VD);
You can’t perform that action at this time.
0 commit comments