Skip to content

Commit 4c41794

Browse files
committed
[NFC] Add a spare bit to Identifier
So that DeclName can have a spare bit, allowing it to be used in places where we’re currently using PointerIntPair<Identifier, 1> or PointerUnion<Identifier, Whatever>.
1 parent 850583a commit 4c41794

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/swift/AST/Identifier.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class Identifier {
5959

6060
public:
6161
enum : size_t {
62-
NumLowBitsAvailable = 2,
62+
NumLowBitsAvailable = 3,
6363
RequiredAlignment = 1 << NumLowBitsAvailable,
6464
SpareBitMask = ((intptr_t)1 << NumLowBitsAvailable) - 1
6565
};
@@ -72,7 +72,7 @@ class Identifier {
7272
}
7373

7474
/// A type with the alignment expected of a valid \c Identifier::Pointer .
75-
struct alignas(uint32_t) Aligner {};
75+
struct alignas(uint64_t) Aligner {};
7676

7777
static_assert(alignof(Aligner) >= RequiredAlignment,
7878
"Identifier table will provide enough spare bits");

0 commit comments

Comments
 (0)