Now that convertFromUnsignedParts has a sane, constant interface,

convertFromZeroExtendedInteger can be simplified as it doesn't need
to make a copy of the source bignum.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42734 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Neil Booth 2007-10-07 12:10:57 +00:00
parent 643ce59495
commit 7a7bc0f724

View File

@ -1594,9 +1594,7 @@ APFloat::convertFromZeroExtendedInteger(const integerPart *parts,
roundingMode rounding_mode)
{
unsigned int partCount = partCountForBits(width);
opStatus status;
APInt api = APInt(width, partCount, parts);
integerPart *copy = new integerPart[partCount];
sign = false;
if(isSigned && APInt::tcExtractBit(parts, width - 1)) {
@ -1604,9 +1602,7 @@ APFloat::convertFromZeroExtendedInteger(const integerPart *parts,
api = -api;
}
APInt::tcAssign(copy, api.getRawData(), partCount);
status = convertFromUnsignedParts(copy, partCount, rounding_mode);
return status;
return convertFromUnsignedParts(api.getRawData(), partCount, rounding_mode);
}
APFloat::opStatus