aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2007-10-07 12:10:57 +0000
committerNeil Booth <neil@daikokuya.co.uk>2007-10-07 12:10:57 +0000
commit804380422ad468acbec6fe69c34a3c746d462767 (patch)
tree5758810e7c21033db1ba9c357b7a35a3b5029e89 /lib/Support
parente4be5315c8630c0f565e541b1620ff152fafd8fb (diff)
downloadexternal_llvm-804380422ad468acbec6fe69c34a3c746d462767.zip
external_llvm-804380422ad468acbec6fe69c34a3c746d462767.tar.gz
external_llvm-804380422ad468acbec6fe69c34a3c746d462767.tar.bz2
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
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/APFloat.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp
index 7e56c84..8343ffe 100644
--- a/lib/Support/APFloat.cpp
+++ b/lib/Support/APFloat.cpp
@@ -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