Skip to content

Commit e0ba222

Browse files
[ADT] Modernize Bitset (NFC)
This patch modernizes BitWord and BITWORD_SIZE with "using" and "static constexpr", respectively.
1 parent a29d7a1 commit e0ba222

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/include/llvm/ADT/Bitset.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ namespace llvm {
2828
/// initialization.
2929
template <unsigned NumBits>
3030
class Bitset {
31-
typedef uintptr_t BitWord;
31+
using BitWord = uintptr_t;
3232

33-
enum { BITWORD_SIZE = (unsigned)sizeof(BitWord) * CHAR_BIT };
33+
static constexpr unsigned BITWORD_SIZE = sizeof(BitWord) * CHAR_BIT;
3434

3535
static_assert(BITWORD_SIZE == 64 || BITWORD_SIZE == 32,
3636
"Unsupported word size");

0 commit comments

Comments
 (0)