mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Add APInt(numBits, ArrayRef<uint64_t> bigVal) constructor to prevent future ambiguity
errors like the one corrected by r135261. Migrate all LLVM callers of the old constructor to the new one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135431 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2098,7 +2098,7 @@ APFloat::convertToInteger(APSInt &result,
|
||||
opStatus status = convertToInteger(
|
||||
parts.data(), bitWidth, result.isSigned(), rounding_mode, isExact);
|
||||
// Keeps the original signed-ness.
|
||||
result = APInt(bitWidth, (unsigned)parts.size(), parts.data());
|
||||
result = APInt(bitWidth, parts);
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -2192,7 +2192,7 @@ APFloat::convertFromZeroExtendedInteger(const integerPart *parts,
|
||||
roundingMode rounding_mode)
|
||||
{
|
||||
unsigned int partCount = partCountForBits(width);
|
||||
APInt api = APInt(width, partCount, parts);
|
||||
APInt api = APInt(width, makeArrayRef(parts, partCount));
|
||||
|
||||
sign = false;
|
||||
if (isSigned && APInt::tcExtractBit(parts, width - 1)) {
|
||||
@@ -2746,7 +2746,7 @@ APFloat::convertF80LongDoubleAPFloatToAPInt() const
|
||||
words[0] = mysignificand;
|
||||
words[1] = ((uint64_t)(sign & 1) << 15) |
|
||||
(myexponent & 0x7fffLL);
|
||||
return APInt(80, 2, words);
|
||||
return APInt(80, words);
|
||||
}
|
||||
|
||||
APInt
|
||||
@@ -2791,7 +2791,7 @@ APFloat::convertPPCDoubleDoubleAPFloatToAPInt() const
|
||||
words[1] = ((uint64_t)(sign2 & 1) << 63) |
|
||||
((myexponent2 & 0x7ff) << 52) |
|
||||
(mysignificand2 & 0xfffffffffffffLL);
|
||||
return APInt(128, 2, words);
|
||||
return APInt(128, words);
|
||||
}
|
||||
|
||||
APInt
|
||||
@@ -2827,7 +2827,7 @@ APFloat::convertQuadrupleAPFloatToAPInt() const
|
||||
((myexponent & 0x7fff) << 48) |
|
||||
(mysignificand2 & 0xffffffffffffLL);
|
||||
|
||||
return APInt(128, 2, words);
|
||||
return APInt(128, words);
|
||||
}
|
||||
|
||||
APInt
|
||||
@@ -3413,8 +3413,8 @@ void APFloat::toString(SmallVectorImpl<char> &Str,
|
||||
// Decompose the number into an APInt and an exponent.
|
||||
int exp = exponent - ((int) semantics->precision - 1);
|
||||
APInt significand(semantics->precision,
|
||||
partCountForBits(semantics->precision),
|
||||
significandParts());
|
||||
makeArrayRef(significandParts(),
|
||||
partCountForBits(semantics->precision)));
|
||||
|
||||
// Set FormatPrecision if zero. We want to do this before we
|
||||
// truncate trailing zeros, as those are part of the precision.
|
||||
|
Reference in New Issue
Block a user