diff --git a/utils/TableGen/CodeGenDAGPatterns.h b/utils/TableGen/CodeGenDAGPatterns.h index 6d904a103c2..37bfe022b4d 100644 --- a/utils/TableGen/CodeGenDAGPatterns.h +++ b/utils/TableGen/CodeGenDAGPatterns.h @@ -52,7 +52,7 @@ struct MachineValueTypeSet { "Change uint8_t here to the SimpleValueType's type"); static unsigned constexpr Capacity = std::numeric_limits::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");