[llvm] [APInt] Added APInt::clearBits() method (PR #137098)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 25 06:24:30 PDT 2025
================
@@ -1413,6 +1413,26 @@ class [[nodiscard]] APInt {
U.pVal[whichWord(BitPosition)] &= Mask;
}
+ /// Clear the bits from loBit (inclusive) to hiBit (exclusive) to 0.
+ /// This function handles case when \p loBit <= \p hiBit.
+ void clearBits(unsigned loBit, unsigned hiBit) {
----------------
jayfoad wrote:
Variable and parameter names should start with a capital letter. Same for `mask` below.
https://github.com/llvm/llvm-project/pull/137098
More information about the llvm-commits
mailing list