@@ -697,7 +697,7 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
697
697
HasAnyUnavailableDuringLoweringValues : 1
698
698
);
699
699
700
- SWIFT_INLINE_BITFIELD (ModuleDecl, TypeDecl, 1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 ,
700
+ SWIFT_INLINE_BITFIELD (ModuleDecl, TypeDecl, 1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 + 1 ,
701
701
// / If the module is compiled as static library.
702
702
StaticLibrary : 1 ,
703
703
@@ -756,7 +756,10 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
756
756
HasCxxInteroperability : 1 ,
757
757
758
758
// / Whether this module has been built with -experimental-allow-non-resilient-access.
759
- AllowNonResilientAccess : 1
759
+ AllowNonResilientAccess : 1 ,
760
+
761
+ // / Whether this module has been built with -experimental-package-cmo.
762
+ SerializePackageEnabled : 1
760
763
);
761
764
762
765
SWIFT_INLINE_BITFIELD (PrecedenceGroupDecl, Decl, 1 +2 ,
@@ -4148,6 +4151,13 @@ class NominalTypeDecl : public GenericTypeDecl, public IterableDeclContext {
4148
4151
// / is built resiliently.
4149
4152
bool isResilient () const ;
4150
4153
4154
+ // / True if the decl is resilient AND also its defining module does
4155
+ // / _not_ allow non-resilient access; the module can allow such access
4156
+ // / if package optimization is enabled so its client modules within the
4157
+ // / same package can have a direct access to this decl even if it's
4158
+ // / resilient.
4159
+ bool isStrictlyResilient () const ;
4160
+
4151
4161
// / Returns whether this decl is accessed non/resiliently at the _use_ site
4152
4162
// / in \p accessingModule, depending on \p expansion.
4153
4163
// /
@@ -5966,6 +5976,13 @@ class AbstractStorageDecl : public ValueDecl {
5966
5976
// / property from the given module?
5967
5977
bool isResilient (ModuleDecl *M, ResilienceExpansion expansion) const ;
5968
5978
5979
+ // / True if the decl is resilient AND also its defining module does
5980
+ // / _not_ allow non-resilient access; the module can allow such access
5981
+ // / if package optimization is enabled so its client modules within the
5982
+ // / same package can have a direct access to this decl even if it's
5983
+ // / resilient.
5984
+ bool isStrictlyResilient () const ;
5985
+
5969
5986
// / True if the storage can be referenced by a keypath directly.
5970
5987
// / Otherwise, its override must be referenced.
5971
5988
bool isValidKeyPathComponent () const ;
0 commit comments