summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Core.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-20 00:26:06 +0000
committerChris Lattner <sabre@nondot.org>2008-04-20 00:26:06 +0000
commitd3018e6a0e459066850b851d5de568656a1c1983 (patch)
tree68dfdddfd94f36666e9ce83ea7f481f9ffa8da97 /llvm/lib/VMCore/Core.cpp
parent1e517a78a8afa00593661fe706e13fc93d62527d (diff)
downloadbcm5719-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.cpp5
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 ...................................--*/
OpenPOWER on IntegriCloud