Skip to content

Commit 5cc0d83

Browse files
committed
[AST] NFC: Use NumExtInfoBits instead of the magic value
1 parent a52b07f commit 5cc0d83

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/swift/AST/Types.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,8 @@ class alignas(1 << TypeAlignInBits) TypeBase {
289289

290290
/// Extra information which affects how the function is called, like
291291
/// regparm and the calling convention.
292-
unsigned ExtInfo : 7; enum { NumExtInfoBits = 7 };
292+
enum { NumExtInfoBits = 7 };
293+
unsigned ExtInfo : NumExtInfoBits;
293294
};
294295
enum { NumAnyFunctionTypeBits = NumTypeBaseBits + 7 };
295296
static_assert(NumAnyFunctionTypeBits <= 32, "fits in an unsigned");
@@ -316,7 +317,8 @@ class alignas(1 << TypeAlignInBits) TypeBase {
316317

317318
struct SILFunctionTypeBitfields {
318319
unsigned : NumTypeBaseBits;
319-
unsigned ExtInfo : 6; enum { NumExtInfoBits = 6 };
320+
enum { NumExtInfoBits = 6 };
321+
unsigned ExtInfo : NumExtInfoBits;
320322
unsigned CalleeConvention : 3;
321323
unsigned HasErrorResult : 1;
322324
unsigned CoroutineKind : 2;

0 commit comments

Comments
 (0)