[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:
Craig Topper 2017-09-21 04:55:04 +00:00
parent c0faa7c21a
commit a6dd78b474

View File

@ -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");