We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8f312d commit 7f1f3afCopy full SHA for 7f1f3af
llvm/lib/Support/APInt.cpp
@@ -502,10 +502,10 @@ uint64_t APInt::extractBitsAsZExtValue(unsigned numBits,
502
if (loWord == hiWord)
503
return (U.pVal[loWord] >> loBit) & maskBits;
504
505
- static_assert(8 * sizeof(WordType) <= 64, "This code assumes only two words affected");
506
- unsigned wordBits = 8 * sizeof(WordType);
+ static_assert(APINT_BITS_PER_WORD <= 64,
+ "This code assumes only two words affected");
507
uint64_t retBits = U.pVal[loWord] >> loBit;
508
- retBits |= U.pVal[hiWord] << (wordBits - loBit);
+ retBits |= U.pVal[hiWord] << (APINT_BITS_PER_WORD - loBit);
509
retBits &= maskBits;
510
return retBits;
511
}
0 commit comments