summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-05-28 18:24:43 +0000
committerCraig Topper <craig.topper@gmail.com>2017-05-28 18:24:43 +0000
commitcf09175de8a7930428cd5e16ead278c5289cbd3e (patch)
tree7644e09e1cc82f88e5814a15fafaf546c201dc83
parent8351075181d2fbccb95389bd42f9f9b15c0f23e8 (diff)
downloadbcm5719-llvm-cf09175de8a7930428cd5e16ead278c5289cbd3e.tar.gz
bcm5719-llvm-cf09175de8a7930428cd5e16ead278c5289cbd3e.zip
[TableGen][X86] Use CHAR_BIT with sizeof instead of hardcoded 8. NFC
llvm-svn: 304100
-rw-r--r--llvm/utils/TableGen/X86FoldTablesEmitter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/X86FoldTablesEmitter.cpp b/llvm/utils/TableGen/X86FoldTablesEmitter.cpp
index 8d72c8178dc..b8a2c99e18d 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) {
OpenPOWER on IntegriCloud