diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-20 00:26:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-20 00:26:06 +0000 |
commit | eb9c8e1e3fd81607f8aa71f2b8b1592d6d333337 (patch) | |
tree | 7e5b4d1cecbac3a47308900c005c5c8fe5ddd16e /lib/VMCore/Core.cpp | |
parent | e0db56db311069416159171b6c7a31587ac0af5c (diff) | |
download | external_llvm-eb9c8e1e3fd81607f8aa71f2b8b1592d6d333337.zip external_llvm-eb9c8e1e3fd81607f8aa71f2b8b1592d6d333337.tar.gz external_llvm-eb9c8e1e3fd81607f8aa71f2b8b1592d6d333337.tar.bz2 |
Use simplified ConstantFP::get method, fix a bug handling frem x, 0 with long doubles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49976 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Core.cpp')
-rw-r--r-- | lib/VMCore/Core.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index 9063977..ad72095 100644 --- a/lib/VMCore/Core.cpp +++ b/lib/VMCore/Core.cpp @@ -307,12 +307,11 @@ static const fltSemantics &SemanticsForType(Type *Ty) { LLVMValueRef LLVMConstReal(LLVMTypeRef RealTy, double N) { APFloat APN(N); APN.convert(SemanticsForType(unwrap(RealTy)), APFloat::rmNearestTiesToEven); - return wrap(ConstantFP::get(unwrap(RealTy), APN)); + return wrap(ConstantFP::get(APN)); } LLVMValueRef LLVMConstRealOfString(LLVMTypeRef RealTy, const char *Text) { - return wrap(ConstantFP::get(unwrap(RealTy), - APFloat(SemanticsForType(unwrap(RealTy)), Text))); + return wrap(ConstantFP::get(APFloat(SemanticsForType(unwrap(RealTy)), Text))); } /*--.. Operations on composite constants ...................................--*/ |