@@ -333,7 +333,7 @@ class alignas(1 << DeclAlignInBits) Decl {
333
333
NumElements : 32
334
334
);
335
335
336
- SWIFT_INLINE_BITFIELD (ValueDecl, Decl, 1 +1 +1 ,
336
+ SWIFT_INLINE_BITFIELD (ValueDecl, Decl, 1 +1 +1 + 1 ,
337
337
AlreadyInLookupTable : 1 ,
338
338
339
339
// / Whether we have already checked whether this declaration is a
@@ -342,7 +342,11 @@ class alignas(1 << DeclAlignInBits) Decl {
342
342
343
343
// / Whether the decl can be accessed by swift users; for instance,
344
344
// / a.storage for lazy var a is a decl that cannot be accessed.
345
- IsUserAccessible : 1
345
+ IsUserAccessible : 1 ,
346
+
347
+ // / Whether this member was synthesized as part of a derived
348
+ // / protocol conformance.
349
+ Synthesized : 1
346
350
);
347
351
348
352
SWIFT_INLINE_BITFIELD (AbstractStorageDecl, ValueDecl, 1 ,
@@ -387,7 +391,7 @@ class alignas(1 << DeclAlignInBits) Decl {
387
391
SWIFT_INLINE_BITFIELD (SubscriptDecl, VarDecl, 2 ,
388
392
StaticSpelling : 2
389
393
);
390
- SWIFT_INLINE_BITFIELD (AbstractFunctionDecl, ValueDecl, 3 +8 +1 +1 +1 +1 +1 +1 + 1 ,
394
+ SWIFT_INLINE_BITFIELD (AbstractFunctionDecl, ValueDecl, 3 +8 +1 +1 +1 +1 +1 +1 ,
391
395
// / \see AbstractFunctionDecl::BodyKind
392
396
BodyKind : 3 ,
393
397
@@ -406,10 +410,6 @@ class alignas(1 << DeclAlignInBits) Decl {
406
410
// / Whether the function body throws.
407
411
Throws : 1 ,
408
412
409
- // / Whether this member was synthesized as part of a derived
410
- // / protocol conformance.
411
- Synthesized : 1 ,
412
-
413
413
// / Whether this member's body consists of a single expression.
414
414
HasSingleExpressionBody : 1 ,
415
415
@@ -2020,6 +2020,7 @@ class ValueDecl : public Decl {
2020
2020
Bits.ValueDecl .AlreadyInLookupTable = false ;
2021
2021
Bits.ValueDecl .CheckedRedeclaration = false ;
2022
2022
Bits.ValueDecl .IsUserAccessible = true ;
2023
+ Bits.ValueDecl .Synthesized = false ;
2023
2024
}
2024
2025
2025
2026
// MemberLookupTable borrows a bit from this type
@@ -2057,6 +2058,14 @@ class ValueDecl : public Decl {
2057
2058
return Bits.ValueDecl .IsUserAccessible ;
2058
2059
}
2059
2060
2061
+ bool isSynthesized () const {
2062
+ return Bits.ValueDecl .Synthesized ;
2063
+ }
2064
+
2065
+ void setSynthesized (bool value = true ) {
2066
+ Bits.ValueDecl .Synthesized = value;
2067
+ }
2068
+
2060
2069
bool hasName () const { return bool (Name); }
2061
2070
bool isOperator () const { return Name.isOperator (); }
2062
2071
@@ -5577,7 +5586,6 @@ class AbstractFunctionDecl : public GenericContext, public ValueDecl {
5577
5586
Bits.AbstractFunctionDecl .Overridden = false ;
5578
5587
Bits.AbstractFunctionDecl .Async = Async;
5579
5588
Bits.AbstractFunctionDecl .Throws = Throws;
5580
- Bits.AbstractFunctionDecl .Synthesized = false ;
5581
5589
Bits.AbstractFunctionDecl .HasSingleExpressionBody = false ;
5582
5590
Bits.AbstractFunctionDecl .HasNestedTypeDeclarations = false ;
5583
5591
}
@@ -5784,14 +5792,6 @@ class AbstractFunctionDecl : public GenericContext, public ValueDecl {
5784
5792
// / vtable.
5785
5793
bool needsNewVTableEntry () const ;
5786
5794
5787
- bool isSynthesized () const {
5788
- return Bits.AbstractFunctionDecl .Synthesized ;
5789
- }
5790
-
5791
- void setSynthesized (bool value = true ) {
5792
- Bits.AbstractFunctionDecl .Synthesized = value;
5793
- }
5794
-
5795
5795
public:
5796
5796
// / Retrieve the source range of the function body.
5797
5797
SourceRange getBodySourceRange () const ;
0 commit comments