summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CBackend/CBackend.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-10-09 23:00:39 +0000
committerDale Johannesen <dalej@apple.com>2008-10-09 23:00:39 +0000
commit4f0bd68cfe4f72902215e1c27411286a8bb7d641 (patch)
treec8880de304064760a3dea7762950f59e7c034cb7 /llvm/lib/Target/CBackend/CBackend.cpp
parent54306fe499499e57ac1bf8c9cd4fbe8321015ffd (diff)
downloadbcm5719-llvm-4f0bd68cfe4f72902215e1c27411286a8bb7d641.tar.gz
bcm5719-llvm-4f0bd68cfe4f72902215e1c27411286a8bb7d641.zip
Add a "loses information" return value to APFloat::convert
and APFloat::convertToInteger. Restore return value to IEEE754. Adjust all users accordingly. llvm-svn: 57329
Diffstat (limited to 'llvm/lib/Target/CBackend/CBackend.cpp')
-rw-r--r--llvm/lib/Target/CBackend/CBackend.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/CBackend/CBackend.cpp b/llvm/lib/Target/CBackend/CBackend.cpp
index 96ae40c3394..9a797480844 100644
--- a/llvm/lib/Target/CBackend/CBackend.cpp
+++ b/llvm/lib/Target/CBackend/CBackend.cpp
@@ -832,12 +832,13 @@ void CWriter::printConstantVector(ConstantVector *CP, bool Static) {
// only deal in IEEE FP).
//
static bool isFPCSafeToPrint(const ConstantFP *CFP) {
+ bool ignored;
// Do long doubles in hex for now.
if (CFP->getType()!=Type::FloatTy && CFP->getType()!=Type::DoubleTy)
return false;
APFloat APF = APFloat(CFP->getValueAPF()); // copy
if (CFP->getType()==Type::FloatTy)
- APF.convert(APFloat::IEEEdouble, APFloat::rmNearestTiesToEven);
+ APF.convert(APFloat::IEEEdouble, APFloat::rmNearestTiesToEven, &ignored);
#if HAVE_PRINTF_A && ENABLE_CBE_PRINTF_A
char Buffer[100];
sprintf(Buffer, "%a", APF.convertToDouble());
OpenPOWER on IntegriCloud