[llvm] r313860 - [TableGen] Use CHAR_BIT instead of hardcoded 8 with sizeof. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 20 21:55:05 PDT 2017
Author: ctopper
Date: Wed Sep 20 21:55:04 2017
New Revision: 313860
URL: http://llvm.org/viewvc/llvm-project?rev=313860&view=rev
Log:
[TableGen] Use CHAR_BIT instead of hardcoded 8 with sizeof. NFC
Modified:
llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h
Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h?rev=313860&r1=313859&r2=313860&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h Wed Sep 20 21:55:04 2017
@@ -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");
More information about the llvm-commits
mailing list