From d022d25eb3567c2328312c81ccbc1cd48e885860 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 21 Sep 2017 04:55:04 +0000 Subject: [TableGen] Use CHAR_BIT instead of hardcoded 8 with sizeof. NFC llvm-svn: 313860 --- llvm/utils/TableGen/CodeGenDAGPatterns.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.h') diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.h b/llvm/utils/TableGen/CodeGenDAGPatterns.h index 6d904a103c2..37bfe022b4d 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.h +++ b/llvm/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"); -- cgit v1.2.3