diff options
author | Neil Booth <neil@daikokuya.co.uk> | 2007-10-07 12:10:57 +0000 |
---|---|---|
committer | Neil Booth <neil@daikokuya.co.uk> | 2007-10-07 12:10:57 +0000 |
commit | ba205229e7141510bcf8767d75f42f0802228817 (patch) | |
tree | 185b7d4e01539c593bacb62c5d6abfecb67ef461 /llvm/lib/Support/APFloat.cpp | |
parent | 6c1c8588ae1de9d70145cc9bd6164b72a8f27fdb (diff) | |
download | bcm5719-llvm-ba205229e7141510bcf8767d75f42f0802228817.tar.gz bcm5719-llvm-ba205229e7141510bcf8767d75f42f0802228817.zip |
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.
llvm-svn: 42734
Diffstat (limited to 'llvm/lib/Support/APFloat.cpp')
-rw-r--r-- | llvm/lib/Support/APFloat.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp index 7e56c849a5e..8343ffe39b7 100644 --- a/llvm/lib/Support/APFloat.cpp +++ b/llvm/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 |