[cfe-commits] r57332 - in /cfe/trunk/lib: AST/Expr.cpp AST/ExprConstant.cpp CodeGen/CGExprScalar.cpp
Dale Johannesen
dalej at apple.com
Thu Oct 9 16:02:32 PDT 2008
Author: johannes
Date: Thu Oct 9 18:02:32 2008
New Revision: 57332
URL: http://llvm.org/viewvc/llvm-project?rev=57332&view=rev
Log:
Adjust calls to APFloat conversion for new interface.
Modified:
cfe/trunk/lib/AST/Expr.cpp
cfe/trunk/lib/AST/ExprConstant.cpp
cfe/trunk/lib/CodeGen/CGExprScalar.cpp
Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=57332&r1=57331&r2=57332&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Thu Oct 9 18:02:32 2008
@@ -29,7 +29,9 @@
/// debugging dumps, etc.
double FloatingLiteral::getValueAsApproximateDouble() const {
llvm::APFloat V = getValue();
- V.convert(llvm::APFloat::IEEEdouble, llvm::APFloat::rmNearestTiesToEven);
+ bool ignored;
+ V.convert(llvm::APFloat::IEEEdouble, llvm::APFloat::rmNearestTiesToEven,
+ &ignored);
return V.convertToDouble();
}
@@ -977,9 +979,11 @@
// TODO: Warn on overflow, but probably not here: isIntegerConstantExpr can
// be called multiple times per AST.
- uint64_t Space[4];
+ uint64_t Space[4];
+ bool ignored;
(void)FL->getValue().convertToInteger(Space, DestWidth, DestSigned,
- llvm::APFloat::rmTowardZero);
+ llvm::APFloat::rmTowardZero,
+ &ignored);
Result = llvm::APInt(DestWidth, 4, Space);
break;
}
Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=57332&r1=57331&r2=57332&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Thu Oct 9 18:02:32 2008
@@ -557,9 +557,10 @@
bool DestSigned = DestType->isSignedIntegerType();
// FIXME: Warning for overflow.
- uint64_t Space[4];
+ uint64_t Space[4];
+ bool ignored;
(void)F.convertToInteger(Space, DestWidth, DestSigned,
- llvm::APFloat::rmTowardZero);
+ llvm::APFloat::rmTowardZero, &ignored);
Result = llvm::APInt(DestWidth, 4, Space);
Result.setIsUnsigned(!DestSigned);
return true;
Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=57332&r1=57331&r2=57332&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Thu Oct 9 18:02:32 2008
@@ -605,7 +605,9 @@
llvm::ConstantFP::get(llvm::APFloat(static_cast<double>(AmountVal)));
else {
llvm::APFloat F(static_cast<float>(AmountVal));
- F.convert(CGF.Target.getLongDoubleFormat(), llvm::APFloat::rmTowardZero);
+ bool ignored;
+ F.convert(CGF.Target.getLongDoubleFormat(), llvm::APFloat::rmTowardZero,
+ &ignored);
NextVal = llvm::ConstantFP::get(F);
}
NextVal = Builder.CreateAdd(InVal, NextVal, isInc ? "inc" : "dec");
More information about the cfe-commits
mailing list