We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63b7f05 commit 2f7289bCopy full SHA for 2f7289b
lib/SILOptimizer/IPO/CrossModuleOptimization.cpp
@@ -651,6 +651,21 @@ bool CrossModuleOptimization::canSerializeFieldsByInstructionKind(
651
canUse = methodScope.isPublicOrPackage();
652
}
653
});
654
+ auto pattern = KPI->getPattern();
655
+ for (auto &component : pattern->getComponents()) {
656
+ if (!canUse) {
657
+ break;
658
+ }
659
+ switch (component.getKind()) {
660
+ case KeyPathPatternComponent::Kind::StoredProperty: {
661
+ auto property = component.getStoredPropertyDecl();
662
+ canUse = property->getEffectiveAccess() >= AccessLevel::Package;
663
664
665
+ default:
666
667
668
669
return canUse;
670
671
if (auto *MI = dyn_cast<MethodInst>(inst)) {
0 commit comments