@@ -339,6 +339,13 @@ class alignas(1 << TypeAlignInBits) TypeBase {
339
339
};
340
340
NUMBITS (SILFunctionType, NumTypeBaseBits + 12 );
341
341
342
+ struct SILBoxTypeBitfields {
343
+ unsigned : NumTypeBaseBits;
344
+ unsigned : 32 - NumTypeBaseBits; // unused / padding
345
+ unsigned NumGenericArgs : 32 ;
346
+ };
347
+ NUMBITS (SILBoxType, 64 );
348
+
342
349
struct AnyMetatypeTypeBitfields {
343
350
unsigned : NumTypeBaseBits;
344
351
// / The representation of the metatype.
@@ -379,6 +386,7 @@ class alignas(1 << TypeAlignInBits) TypeBase {
379
386
TypeVariableTypeBitfields TypeVariableTypeBits;
380
387
ArchetypeTypeBitfields ArchetypeTypeBits;
381
388
SILFunctionTypeBitfields SILFunctionTypeBits;
389
+ SILBoxTypeBitfields SILBoxTypeBits;
382
390
AnyMetatypeTypeBitfields AnyMetatypeTypeBits;
383
391
ProtocolCompositionTypeBitfields ProtocolCompositionTypeBits;
384
392
TupleTypeBitfields TupleTypeBits;
@@ -3806,7 +3814,6 @@ class SILBoxType final : public TypeBase,
3806
3814
friend TrailingObjects;
3807
3815
3808
3816
SILLayout *Layout;
3809
- unsigned NumGenericArgs;
3810
3817
3811
3818
static RecursiveTypeProperties
3812
3819
getRecursivePropertiesFromSubstitutions (SubstitutionList Args);
@@ -3822,7 +3829,7 @@ class SILBoxType final : public TypeBase,
3822
3829
SILLayout *getLayout () const { return Layout; }
3823
3830
SubstitutionList getGenericArgs () const {
3824
3831
return llvm::makeArrayRef (getTrailingObjects<Substitution>(),
3825
- NumGenericArgs);
3832
+ SILBoxTypeBits. NumGenericArgs );
3826
3833
}
3827
3834
3828
3835
// In SILType.h:
0 commit comments