Skip to content

Commit 2d8fa9d

Browse files
committed
changed capitalization for APInt::clearbits
1 parent e85f09c commit 2d8fa9d

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

llvm/include/llvm/ADT/APInt.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,20 +1415,20 @@ class [[nodiscard]] APInt {
14151415

14161416
/// Clear the bits from loBit (inclusive) to hiBit (exclusive) to 0.
14171417
/// This function handles case when \p loBit <= \p hiBit.
1418-
void clearBits(unsigned loBit, unsigned hiBit) {
1419-
assert(hiBit <= BitWidth && "hiBit out of range");
1420-
assert(loBit <= hiBit && "loBit greater than hiBit");
1421-
if (loBit == hiBit)
1418+
void clearBits(unsigned LoBit, unsigned HiBit) {
1419+
assert(HiBit <= BitWidth && "hiBit out of range");
1420+
assert(LoBit <= HiBit && "loBit greater than hiBit");
1421+
if (LoBit == HiBit)
14221422
return;
1423-
if (hiBit <= APINT_BITS_PER_WORD) {
1424-
uint64_t mask = WORDTYPE_MAX >> (APINT_BITS_PER_WORD - (hiBit - loBit));
1425-
mask = ~(mask << loBit);
1423+
if (HiBit <= APINT_BITS_PER_WORD) {
1424+
uint64_t Mask = WORDTYPE_MAX >> (APINT_BITS_PER_WORD - (HiBit - LoBit));
1425+
Mask = ~(Mask << LoBit);
14261426
if (isSingleWord())
1427-
U.VAL &= mask;
1427+
U.VAL &= Mask;
14281428
else
1429-
U.pVal[0] &= mask;
1429+
U.pVal[0] &= Mask;
14301430
} else {
1431-
clearBitsSlowCase(loBit, hiBit);
1431+
clearBitsSlowCase(LoBit, HiBit);
14321432
}
14331433
}
14341434

llvm/lib/Support/APInt.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -336,31 +336,31 @@ void APInt::setBitsSlowCase(unsigned loBit, unsigned hiBit) {
336336
U.pVal[word] = WORDTYPE_MAX;
337337
}
338338

339-
void APInt::clearBitsSlowCase(unsigned loBit, unsigned hiBit) {
340-
unsigned loWord = whichWord(loBit);
341-
unsigned hiWord = whichWord(hiBit);
339+
void APInt::clearBitsSlowCase(unsigned LoBit, unsigned HiBit) {
340+
unsigned LoWord = whichWord(LoBit);
341+
unsigned HiWord = whichWord(HiBit);
342342

343343
// Create an initial mask for the low word with ones below loBit.
344-
uint64_t loMask = ~(WORDTYPE_MAX << whichBit(loBit));
344+
uint64_t LoMask = ~(WORDTYPE_MAX << whichBit(LoBit));
345345

346346
// If hiBit is not aligned, we need a high mask.
347-
unsigned hiShiftAmt = whichBit(hiBit);
348-
if (hiShiftAmt != 0) {
347+
unsigned HiShiftAmt = whichBit(HiBit);
348+
if (HiShiftAmt != 0) {
349349
// Create a high mask with ones above hiBit.
350-
uint64_t hiMask = ~(WORDTYPE_MAX >> (APINT_BITS_PER_WORD - hiShiftAmt));
350+
uint64_t HiMask = ~(WORDTYPE_MAX >> (APINT_BITS_PER_WORD - HiShiftAmt));
351351
// If loWord and hiWord are equal, then we combine the masks. Otherwise,
352352
// set the bits in hiWord.
353-
if (hiWord == loWord)
354-
loMask &= hiMask;
353+
if (HiWord == LoWord)
354+
LoMask &= HiMask;
355355
else
356-
U.pVal[hiWord] &= hiMask;
356+
U.pVal[HiWord] &= HiMask;
357357
}
358358
// Apply the mask to the low word.
359-
U.pVal[loWord] &= loMask;
359+
U.pVal[LoWord] &= LoMask;
360360

361361
// Fill any words between loWord and hiWord with all zeros.
362-
for (unsigned word = loWord + 1; word < hiWord; ++word)
363-
U.pVal[word] = 0;
362+
for (unsigned Word = LoWord + 1; Word < HiWord; ++Word)
363+
U.pVal[Word] = 0;
364364
}
365365

366366
// Complement a bignum in-place.

0 commit comments

Comments
 (0)