diff options
author | Dale Johannesen <dalej@apple.com> | 2008-10-09 23:00:39 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-10-09 23:00:39 +0000 |
commit | 23a98551ab65eeb8fe5019df8b7db4891582a4bd (patch) | |
tree | 90d6731fd446c04df49383b8a23da0461337ba09 /lib/VMCore/Core.cpp | |
parent | 7111b02c734c992b8c97d9918118768026dad79e (diff) | |
download | external_llvm-23a98551ab65eeb8fe5019df8b7db4891582a4bd.zip external_llvm-23a98551ab65eeb8fe5019df8b7db4891582a4bd.tar.gz external_llvm-23a98551ab65eeb8fe5019df8b7db4891582a4bd.tar.bz2 |
Add a "loses information" return value to APFloat::convert
and APFloat::convertToInteger. Restore return value to
IEEE754. Adjust all users accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57329 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Core.cpp')
-rw-r--r-- | lib/VMCore/Core.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index a802373..afc1c90 100644 --- a/lib/VMCore/Core.cpp +++ b/lib/VMCore/Core.cpp @@ -302,7 +302,9 @@ static const fltSemantics &SemanticsForType(Type *Ty) { LLVMValueRef LLVMConstReal(LLVMTypeRef RealTy, double N) { APFloat APN(N); - APN.convert(SemanticsForType(unwrap(RealTy)), APFloat::rmNearestTiesToEven); + bool ignored; + APN.convert(SemanticsForType(unwrap(RealTy)), APFloat::rmNearestTiesToEven, + &ignored); return wrap(ConstantFP::get(APN)); } |