aboutsummaryrefslogtreecommitdiff
path: root/lib/IR/Constants.cpp
diff options
context:
space:
mode:
authorTim Northover <Tim.Northover@arm.com>2013-01-22 09:46:31 +0000
committerTim Northover <Tim.Northover@arm.com>2013-01-22 09:46:31 +0000
commit0a29cb045444c13160e90fe7942a9d7c720185ed (patch)
treea52b128abcdecbe22becedeaa028b36217e450a2 /lib/IR/Constants.cpp
parentdc89ed7da30e882cfdb74968b2a7613e37570409 (diff)
Make APFloat constructor require explicit semantics.
Previously we tried to infer it from the bit width size, with an added IsIEEE argument for the PPC/IEEE 128-bit case, which had a default value. This default value allowed bugs to creep in, where it was inappropriate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173138 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/Constants.cpp')
-rw-r--r--lib/IR/Constants.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/IR/Constants.cpp b/lib/IR/Constants.cpp
index e984aaca33..8093a09749 100644
--- a/lib/IR/Constants.cpp
+++ b/lib/IR/Constants.cpp
@@ -119,7 +119,8 @@ Constant *Constant::getNullValue(Type *Ty) {
APFloat::getZero(APFloat::IEEEquad));
case Type::PPC_FP128TyID:
return ConstantFP::get(Ty->getContext(),
- APFloat(APInt::getNullValue(128)));
+ APFloat(APFloat::PPCDoubleDouble,
+ APInt::getNullValue(128)));
case Type::PointerTyID:
return ConstantPointerNull::get(cast<PointerType>(Ty));
case Type::StructTyID: