OSDN Git Service

This cast broke lots of tests.
authorEvan Cheng <evan.cheng@apple.com>
Tue, 20 Feb 2007 21:30:56 +0000 (21:30 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 20 Feb 2007 21:30:56 +0000 (21:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34457 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Constants.cpp

index cb61b0b..fa35a89 100644 (file)
@@ -248,7 +248,7 @@ ConstantFP *ConstantFP::get(const Type *Ty, double V) {
     uint64_t IntVal = DoubleToBits(V);
     ConstantFP *&Slot = (*DoubleConstants)[std::make_pair(IntVal, Ty)];
     if (Slot) return Slot;
-    return Slot = new ConstantFP(Ty, (float)V);
+    return Slot = new ConstantFP(Ty, V);
   }
 }