mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 23:18:58 +00:00
[TableGen] Use CHAR_BIT instead of hardcoded 8 with sizeof. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313860 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c0faa7c21a
commit
a6dd78b474
@ -52,7 +52,7 @@ struct MachineValueTypeSet {
|
||||
"Change uint8_t here to the SimpleValueType's type");
|
||||
static unsigned constexpr Capacity = std::numeric_limits<uint8_t>::max()+1;
|
||||
using WordType = uint64_t;
|
||||
static unsigned constexpr WordWidth = 8*sizeof(WordType);
|
||||
static unsigned constexpr WordWidth = CHAR_BIT*sizeof(WordType);
|
||||
static unsigned constexpr NumWords = Capacity/WordWidth;
|
||||
static_assert(NumWords*WordWidth == Capacity,
|
||||
"Capacity should be a multiple of WordWidth");
|
||||
|
Loading…
Reference in New Issue
Block a user