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 | d3018e6a0e459066850b851d5de568656a1c1983 (patch) | |
tree | 68dfdddfd94f36666e9ce83ea7f481f9ffa8da97 /llvm/lib/VMCore/Core.cpp | |
parent | 1e517a78a8afa00593661fe706e13fc93d62527d (diff) | |
download | bcm5719-llvm-d3018e6a0e459066850b851d5de568656a1c1983.tar.gz bcm5719-llvm-d3018e6a0e459066850b851d5de568656a1c1983.zip |
Use simplified ConstantFP::get method, fix a bug handling frem x, 0 with long doubles.
llvm-svn: 49976
Diffstat (limited to 'llvm/lib/VMCore/Core.cpp')
-rw-r--r-- | llvm/lib/VMCore/Core.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/Core.cpp b/llvm/lib/VMCore/Core.cpp index 906397791ba..ad72095fe5d 100644 --- a/llvm/lib/VMCore/Core.cpp +++ b/llvm/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 ...................................--*/ |