aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm12/lib/Support/APInt.cpp
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/libs/llvm12/lib/Support/APInt.cpp
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
downloadydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/llvm12/lib/Support/APInt.cpp')
-rw-r--r--contrib/libs/llvm12/lib/Support/APInt.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/libs/llvm12/lib/Support/APInt.cpp b/contrib/libs/llvm12/lib/Support/APInt.cpp
index 895e530a59..12ceb2df11 100644
--- a/contrib/libs/llvm12/lib/Support/APInt.cpp
+++ b/contrib/libs/llvm12/lib/Support/APInt.cpp
@@ -338,7 +338,7 @@ void APInt::flipAllBitsSlowCase() {
/// Toggles a given bit to its opposite value.
void APInt::flipBit(unsigned bitPosition) {
assert(bitPosition < BitWidth && "Out of the bit-width range!");
- setBitVal(bitPosition, !(*this)[bitPosition]);
+ setBitVal(bitPosition, !(*this)[bitPosition]);
}
void APInt::insertBits(const APInt &subBits, unsigned bitPosition) {
@@ -392,8 +392,8 @@ void APInt::insertBits(const APInt &subBits, unsigned bitPosition) {
// General case - set/clear individual bits in dst based on src.
// TODO - there is scope for optimization here, but at the moment this code
// path is barely used so prefer readability over performance.
- for (unsigned i = 0; i != subBitWidth; ++i)
- setBitVal(bitPosition + i, subBits[i]);
+ for (unsigned i = 0; i != subBitWidth; ++i)
+ setBitVal(bitPosition + i, subBits[i]);
}
void APInt::insertBits(uint64_t subBits, unsigned bitPosition, unsigned numBits) {
@@ -961,12 +961,12 @@ APInt APInt::sextOrTrunc(unsigned width) const {
return *this;
}
-APInt APInt::truncOrSelf(unsigned width) const {
- if (BitWidth > width)
- return trunc(width);
- return *this;
-}
-
+APInt APInt::truncOrSelf(unsigned width) const {
+ if (BitWidth > width)
+ return trunc(width);
+ return *this;
+}
+
APInt APInt::zextOrSelf(unsigned width) const {
if (BitWidth < width)
return zext(width);