Skip to content

Commit 4601df7

Browse files
Miloš StojanovićMiloš Stojanović
authored andcommitted
[NFC][APInt] Fix typos in comments.
Testing git commit access.
1 parent bcae3b0 commit 4601df7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

llvm/include/llvm/ADT/APInt.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,7 @@ class LLVM_NODISCARD APInt {
12491249
/// \returns true if *this <= RHS when considered signed.
12501250
bool sle(uint64_t RHS) const { return !sgt(RHS); }
12511251

1252-
/// Unsigned greather than comparison
1252+
/// Unsigned greater than comparison
12531253
///
12541254
/// Regards both *this and RHS as unsigned quantities and compares them for
12551255
/// the validity of the greater-than relationship.
@@ -1268,7 +1268,7 @@ class LLVM_NODISCARD APInt {
12681268
return (!isSingleWord() && getActiveBits() > 64) || getZExtValue() > RHS;
12691269
}
12701270

1271-
/// Signed greather than comparison
1271+
/// Signed greater than comparison
12721272
///
12731273
/// Regards both *this and RHS as signed quantities and compares them for the
12741274
/// validity of the greater-than relationship.
@@ -2162,7 +2162,7 @@ inline float RoundAPIntToFloat(const APInt &APIVal) {
21622162

21632163
/// Converts the given APInt to a float value.
21642164
///
2165-
/// Treast the APInt as a signed value for conversion purposes.
2165+
/// Treats the APInt as a signed value for conversion purposes.
21662166
inline float RoundSignedAPIntToFloat(const APInt &APIVal) {
21672167
return float(APIVal.signedRoundToDouble());
21682168
}
@@ -2198,7 +2198,7 @@ APInt RoundingSDiv(const APInt &A, const APInt &B, APInt::Rounding RM);
21982198
/// count as an overflow, but here we want to allow values to decrease
21992199
/// and increase as long as they are within the same interval.
22002200
/// Specifically, adding of two negative numbers should not cause an
2201-
/// overflow (as long as the magnitude does not exceed the bith width).
2201+
/// overflow (as long as the magnitude does not exceed the bit width).
22022202
/// On the other hand, given a positive number, adding a negative
22032203
/// number to it can give a negative result, which would cause the
22042204
/// value to go from [-2^BW, 0) to [0, 2^BW). In that sense, zero is

llvm/lib/Support/APInt.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ APInt& APInt::operator--() {
187187
return clearUnusedBits();
188188
}
189189

190-
/// Adds the RHS APint to this APInt.
190+
/// Adds the RHS APInt to this APInt.
191191
/// @returns this, after addition of RHS.
192192
/// Addition assignment operator.
193193
APInt& APInt::operator+=(const APInt& RHS) {
@@ -2830,7 +2830,7 @@ APInt llvm::APIntOps::RoundingSDiv(const APInt &A, const APInt &B,
28302830
return Quo;
28312831
return Quo + 1;
28322832
}
2833-
// Currently sdiv rounds twards zero.
2833+
// Currently sdiv rounds towards zero.
28342834
case APInt::Rounding::TOWARD_ZERO:
28352835
return A.sdiv(B);
28362836
}
@@ -2973,7 +2973,7 @@ llvm::APIntOps::SolveQuadraticEquationWrap(APInt A, APInt B, APInt C,
29732973
APInt Q = SQ * SQ;
29742974
bool InexactSQ = Q != D;
29752975
// The calculated SQ may actually be greater than the exact (non-integer)
2976-
// value. If that's the case, decremement SQ to get a value that is lower.
2976+
// value. If that's the case, decrement SQ to get a value that is lower.
29772977
if (Q.sgt(D))
29782978
SQ -= 1;
29792979

0 commit comments

Comments
 (0)