@@ -452,7 +452,7 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
452452 IsStatic : 1
453453 );
454454
455- SWIFT_INLINE_BITFIELD (VarDecl, AbstractStorageDecl, 2 +1 +1 +1 +1 +1 +1 ,
455+ SWIFT_INLINE_BITFIELD (VarDecl, AbstractStorageDecl, 2 +1 +1 +1 +1 +1 +1 + 1 ,
456456 // / Encodes whether this is a 'let' binding.
457457 Introducer : 2 ,
458458
@@ -472,6 +472,9 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
472472 // / Whether this is a lazily top-level global variable from the main file.
473473 IsTopLevelGlobal : 1 ,
474474
475+ // / Whether this variable has no attached property wrappers.
476+ NoAttachedPropertyWrappers : 1 ,
477+
475478 // / Whether this variable has no property wrapper auxiliary variables.
476479 NoPropertyWrapperAuxiliaryVariables : 1
477480 );
@@ -6158,11 +6161,19 @@ enum class PropertyWrapperSynthesizedPropertyKind {
61586161// / VarDecl - 'var' and 'let' declarations.
61596162class VarDecl : public AbstractStorageDecl {
61606163 friend class NamingPatternRequest ;
6164+ friend class AttachedPropertyWrappersRequest ;
61616165 friend class PropertyWrapperAuxiliaryVariablesRequest ;
61626166
61636167 NamedPattern *NamingPattern = nullptr ;
61646168
6165- // / True if this is a top-level global variable from the main source file.
6169+ bool hasNoAttachedPropertyWrappers () const {
6170+ return Bits.VarDecl .NoAttachedPropertyWrappers ;
6171+ }
6172+
6173+ void setHasNoAttachedPropertyWrappers () {
6174+ Bits.VarDecl .NoAttachedPropertyWrappers = true ;
6175+ }
6176+
61666177 bool hasNoPropertyWrapperAuxiliaryVariables () const {
61676178 return Bits.VarDecl .NoPropertyWrapperAuxiliaryVariables ;
61686179 }
0 commit comments