@@ -697,7 +697,7 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
697697 HasAnyUnavailableDuringLoweringValues : 1
698698 );
699699
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 ,
701701 // / If the module is compiled as static library.
702702 StaticLibrary : 1 ,
703703
@@ -756,7 +756,10 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
756756 HasCxxInteroperability : 1 ,
757757
758758 // / 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
760763 );
761764
762765 SWIFT_INLINE_BITFIELD (PrecedenceGroupDecl, Decl, 1 +2 ,
@@ -4148,6 +4151,13 @@ class NominalTypeDecl : public GenericTypeDecl, public IterableDeclContext {
41484151 // / is built resiliently.
41494152 bool isResilient () const ;
41504153
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+
41514161 // / Returns whether this decl is accessed non/resiliently at the _use_ site
41524162 // / in \p accessingModule, depending on \p expansion.
41534163 // /
@@ -5966,6 +5976,13 @@ class AbstractStorageDecl : public ValueDecl {
59665976 // / property from the given module?
59675977 bool isResilient (ModuleDecl *M, ResilienceExpansion expansion) const ;
59685978
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+
59695986 // / True if the storage can be referenced by a keypath directly.
59705987 // / Otherwise, its override must be referenced.
59715988 bool isValidKeyPathComponent () const ;
0 commit comments