[llvm-commits] [llvm] r42734 - /llvm/trunk/lib/Support/APFloat.cpp
Neil Booth
neil at daikokuya.co.uk
Sun Oct 7 05:10:58 PDT 2007
Author: neil
Date: Sun Oct 7 07:10:57 2007
New Revision: 42734
URL: http://llvm.org/viewvc/llvm-project?rev=42734&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Support/APFloat.cpp
Modified: llvm/trunk/lib/Support/APFloat.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APFloat.cpp?rev=42734&r1=42733&r2=42734&view=diff
==============================================================================
--- llvm/trunk/lib/Support/APFloat.cpp (original)
+++ llvm/trunk/lib/Support/APFloat.cpp Sun Oct 7 07:10:57 2007
@@ -1594,9 +1594,7 @@
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 @@
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
More information about the llvm-commits
mailing list