@@ -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
// /
@@ -6011,6 +6021,13 @@ class AbstractStorageDecl : public ValueDecl {
6011
6021
// / property from the given module?
6012
6022
bool isResilient (ModuleDecl *M, ResilienceExpansion expansion) const ;
6013
6023
6024
+ // / True if the decl is resilient AND also its defining module does
6025
+ // / _not_ allow non-resilient access; the module can allow such access
6026
+ // / if package optimization is enabled so its client modules within the
6027
+ // / same package can have a direct access to this decl even if it's
6028
+ // / resilient.
6029
+ bool isStrictlyResilient () const ;
6030
+
6014
6031
// / True if the storage can be referenced by a keypath directly.
6015
6032
// / Otherwise, its override must be referenced.
6016
6033
bool isValidKeyPathComponent () const ;
0 commit comments