From: Craig Topper Date: Sun, 28 May 2017 18:24:43 +0000 (+0000) Subject: [TableGen][X86] Use CHAR_BIT with sizeof instead of hardcoded 8. NFC X-Git-Tag: llvmorg-5.0.0-rc1~4069 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf09175de8a7930428cd5e16ead278c5289cbd3e;p=platform%2Fupstream%2Fllvm.git [TableGen][X86] Use CHAR_BIT with sizeof instead of hardcoded 8. NFC llvm-svn: 304100 --- diff --git a/llvm/utils/TableGen/X86FoldTablesEmitter.cpp b/llvm/utils/TableGen/X86FoldTablesEmitter.cpp index 8d72c81..b8a2c99e 100644 --- a/llvm/utils/TableGen/X86FoldTablesEmitter.cpp +++ b/llvm/utils/TableGen/X86FoldTablesEmitter.cpp @@ -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) {