[TableGen][X86] Use CHAR_BIT with sizeof instead of hardcoded 8. NFC
authorCraig Topper <craig.topper@gmail.com>
Sun, 28 May 2017 18:24:43 +0000 (18:24 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sun, 28 May 2017 18:24:43 +0000 (18:24 +0000)
llvm-svn: 304100

llvm/utils/TableGen/X86FoldTablesEmitter.cpp

index 8d72c81..b8a2c99 100644 (file)
@@ -241,7 +241,8 @@ static bool hasPtrTailcallRegClass(const CodeGenInstruction *Inst) {
 
 // Calculates the integer value representing the BitsInit object
 static inline uint64_t getValueFromBitsInit(const BitsInit *B) {
-  assert(B->getNumBits() <= sizeof(uint64_t) * 8 && "BitInits' too long!");
+  assert(B->getNumBits() <= sizeof(uint64_t) * CHAR_BIT &&
+         "BitInits' too long!");
 
   uint64_t Value = 0;
   for (unsigned i = 0, e = B->getNumBits(); i != e; ++i) {