@@ -357,7 +357,7 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
357
357
// for the inline bitfields.
358
358
union { uint64_t OpaqueBits;
359
359
360
- SWIFT_INLINE_BITFIELD_BASE (Decl, bitmax (NumDeclKindBits,8 )+1 +1 +1 +1 +1 +1 +1 ,
360
+ SWIFT_INLINE_BITFIELD_BASE (Decl, bitmax (NumDeclKindBits,8 )+1 +1 +1 +1 +1 +1 +1 + 1 + 1 + 1 + 1 ,
361
361
Kind : bitmax (NumDeclKindBits,8 ),
362
362
363
363
// / Whether this declaration is invalid.
@@ -388,7 +388,23 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
388
388
// / True if \c ObjCInterfaceAndImplementationRequest has been computed
389
389
// / and did \em not find anything. This is the fast path where we can bail
390
390
// / out without checking other caches or computing anything.
391
- LacksObjCInterfaceOrImplementation : 1
391
+ LacksObjCInterfaceOrImplementation : 1 ,
392
+
393
+ // / True if we're in the common case where the ExpandMemberAttributeMacros
394
+ // / request returned an empty array.
395
+ NoMemberAttributeMacros : 1 ,
396
+
397
+ // / True if we're in the common case where the ExpandPeerMacroRequest
398
+ // / request returned an empty array.
399
+ NoPeerMacros : 1 ,
400
+
401
+ // / True if we're in the common case where the GlobalActorAttributeRequest
402
+ // / request returned a pair of null pointers.
403
+ NoGlobalActorAttribute : 1 ,
404
+
405
+ // / True if we're in the common case where the SPIGroupsRequest
406
+ // / request returned an empty array of identifiers.
407
+ NoSPIGroups : 1
392
408
);
393
409
394
410
SWIFT_INLINE_BITFIELD_FULL (PatternBindingDecl, Decl, 1 +1 +2 +16 ,
@@ -436,7 +452,7 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
436
452
IsStatic : 1
437
453
);
438
454
439
- SWIFT_INLINE_BITFIELD (VarDecl, AbstractStorageDecl, 2 +1 +1 +1 +1 +1 ,
455
+ SWIFT_INLINE_BITFIELD (VarDecl, AbstractStorageDecl, 2 +1 +1 +1 +1 +1 + 1 + 1 ,
440
456
// / Encodes whether this is a 'let' binding.
441
457
Introducer : 2 ,
442
458
@@ -454,7 +470,13 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
454
470
IsPropertyWrapperBackingProperty : 1 ,
455
471
456
472
// / Whether this is a lazily top-level global variable from the main file.
457
- IsTopLevelGlobal : 1
473
+ IsTopLevelGlobal : 1 ,
474
+
475
+ // / Whether this variable has no attached property wrappers.
476
+ NoAttachedPropertyWrappers : 1 ,
477
+
478
+ // / Whether this variable has no property wrapper auxiliary variables.
479
+ NoPropertyWrapperAuxiliaryVariables : 1
458
480
);
459
481
460
482
SWIFT_INLINE_BITFIELD (ParamDecl, VarDecl, 1 +2 +NumDefaultArgumentKindBits,
@@ -504,7 +526,7 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
504
526
505
527
// / Whether this function is a distributed thunk for a distributed
506
528
// / function or computed property.
507
- DistributedThunk: 1
529
+ DistributedThunk : 1
508
530
);
509
531
510
532
SWIFT_INLINE_BITFIELD (FuncDecl, AbstractFunctionDecl,
@@ -827,6 +849,10 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
827
849
friend class MemberLookupTable ;
828
850
friend class DeclDeserializer ;
829
851
friend class RawCommentRequest ;
852
+ friend class ExpandMemberAttributeMacros ;
853
+ friend class ExpandPeerMacroRequest ;
854
+ friend class GlobalActorAttributeRequest ;
855
+ friend class SPIGroupsRequest ;
830
856
831
857
private:
832
858
llvm::PointerUnion<DeclContext *, ASTContext *> Context;
@@ -845,6 +871,38 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
845
871
// / Directly set the invalid bit
846
872
void setInvalidBit ();
847
873
874
+ bool hasNoMemberAttributeMacros () const {
875
+ return Bits.Decl .NoMemberAttributeMacros ;
876
+ }
877
+
878
+ void setHasNoMemberAttributeMacros () {
879
+ Bits.Decl .NoMemberAttributeMacros = true ;
880
+ }
881
+
882
+ bool hasNoPeerMacros () const {
883
+ return Bits.Decl .NoPeerMacros ;
884
+ }
885
+
886
+ void setHasNoPeerMacros () {
887
+ Bits.Decl .NoPeerMacros = true ;
888
+ }
889
+
890
+ bool hasNoGlobalActorAttribute () const {
891
+ return Bits.Decl .NoGlobalActorAttribute ;
892
+ }
893
+
894
+ void setHasNoGlobalActorAttribute () {
895
+ Bits.Decl .NoGlobalActorAttribute = true ;
896
+ }
897
+
898
+ bool hasNoSPIGroups () const {
899
+ return Bits.Decl .NoSPIGroups ;
900
+ }
901
+
902
+ void setHasNoSPIGroups () {
903
+ Bits.Decl .NoSPIGroups = true ;
904
+ }
905
+
848
906
protected:
849
907
850
908
Decl (DeclKind kind, llvm::PointerUnion<DeclContext *, ASTContext *> context)
@@ -857,6 +915,9 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl> {
857
915
Bits.Decl .EscapedFromIfConfig = false ;
858
916
Bits.Decl .Hoisted = false ;
859
917
Bits.Decl .LacksObjCInterfaceOrImplementation = false ;
918
+ Bits.Decl .NoMemberAttributeMacros = false ;
919
+ Bits.Decl .NoGlobalActorAttribute = false ;
920
+ Bits.Decl .NoSPIGroups = false ;
860
921
}
861
922
862
923
// / Get the Clang node associated with this declaration.
@@ -2749,6 +2810,10 @@ class ValueDecl : public Decl {
2749
2810
// / allows the entity to be replaced at runtime.
2750
2811
unsigned isDynamic : 1 ;
2751
2812
2813
+ // / Whether the DynamicallyReplacedDeclRequest request was evaluated and
2814
+ // / output a null pointer.
2815
+ unsigned noDynamicallyReplacedDecl : 1 ;
2816
+
2752
2817
// / Whether the "isFinal" bit has been computed yet.
2753
2818
unsigned isFinalComputed : 1 ;
2754
2819
@@ -2762,6 +2827,13 @@ class ValueDecl : public Decl {
2762
2827
// / Whether this declaration produces an implicitly unwrapped
2763
2828
// / optional result.
2764
2829
unsigned isIUO : 1 ;
2830
+
2831
+ // / Whether we're in the common case where the ActorIsolationRequest
2832
+ // / request returned ActorIsolation::forUnspecified().
2833
+ unsigned noActorIsolation : 1 ;
2834
+
2835
+ // / Whether we've evaluated the ApplyAccessNoteRequest.
2836
+ unsigned accessNoteApplied : 1 ;
2765
2837
} LazySemanticInfo = { };
2766
2838
2767
2839
friend class DynamicallyReplacedDeclRequest ;
@@ -2772,6 +2844,9 @@ class ValueDecl : public Decl {
2772
2844
friend class IsImplicitlyUnwrappedOptionalRequest ;
2773
2845
friend class InterfaceTypeRequest ;
2774
2846
friend class CheckRedeclarationRequest ;
2847
+ friend class ActorIsolationRequest ;
2848
+ friend class DynamicallyReplacedDeclRequest ;
2849
+ friend class ApplyAccessNoteRequest ;
2775
2850
friend class Decl ;
2776
2851
SourceLoc getLocFromSource () const { return NameLoc; }
2777
2852
protected:
@@ -6090,8 +6165,27 @@ enum class PropertyWrapperSynthesizedPropertyKind {
6090
6165
// / VarDecl - 'var' and 'let' declarations.
6091
6166
class VarDecl : public AbstractStorageDecl {
6092
6167
friend class NamingPatternRequest ;
6168
+ friend class AttachedPropertyWrappersRequest ;
6169
+ friend class PropertyWrapperAuxiliaryVariablesRequest ;
6170
+
6093
6171
NamedPattern *NamingPattern = nullptr ;
6094
6172
6173
+ bool hasNoAttachedPropertyWrappers () const {
6174
+ return Bits.VarDecl .NoAttachedPropertyWrappers ;
6175
+ }
6176
+
6177
+ void setHasNoAttachedPropertyWrappers () {
6178
+ Bits.VarDecl .NoAttachedPropertyWrappers = true ;
6179
+ }
6180
+
6181
+ bool hasNoPropertyWrapperAuxiliaryVariables () const {
6182
+ return Bits.VarDecl .NoPropertyWrapperAuxiliaryVariables ;
6183
+ }
6184
+
6185
+ void setHasNoPropertyWrapperAuxiliaryVariables () {
6186
+ Bits.VarDecl .NoPropertyWrapperAuxiliaryVariables = true ;
6187
+ }
6188
+
6095
6189
public:
6096
6190
enum class Introducer : uint8_t {
6097
6191
Let = 0 ,
@@ -7416,6 +7510,7 @@ class AbstractFunctionDecl : public GenericContext, public ValueDecl {
7416
7510
friend class ParseAbstractFunctionBodyRequest ;
7417
7511
friend class TypeCheckFunctionBodyRequest ;
7418
7512
friend class IsFunctionBodySkippedRequest ;
7513
+ friend class LifetimeDependenceInfoRequest ;
7419
7514
7420
7515
CaptureInfo Captures;
7421
7516
@@ -7431,6 +7526,7 @@ class AbstractFunctionDecl : public GenericContext, public ValueDecl {
7431
7526
struct {
7432
7527
unsigned NeedsNewVTableEntryComputed : 1 ;
7433
7528
unsigned NeedsNewVTableEntry : 1 ;
7529
+ unsigned NoLifetimeDependenceInfo : 1 ;
7434
7530
} LazySemanticInfo = { };
7435
7531
7436
7532
AbstractFunctionDecl (DeclKind Kind, DeclContext *Parent, DeclName Name,
0 commit comments