use simplified ConstantFP:get method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49979 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index 8abccda..d1d29ab 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -101,7 +101,7 @@
     return llvm::ConstantInt::get(E->getValue());
   }
   Value *VisitFloatingLiteral(const FloatingLiteral *E) {
-    return llvm::ConstantFP::get(ConvertType(E->getType()), E->getValue());
+    return llvm::ConstantFP::get(E->getValue());
   }
   Value *VisitCharacterLiteral(const CharacterLiteral *E) {
     return llvm::ConstantInt::get(ConvertType(E->getType()), E->getValue());
@@ -604,14 +604,12 @@
     else if (InVal->getType() == llvm::Type::FloatTy)
       // FIXME: Handle long double.
       NextVal = 
-        llvm::ConstantFP::get(InVal->getType(),
-                              llvm::APFloat(static_cast<float>(AmountVal)));
+        llvm::ConstantFP::get(llvm::APFloat(static_cast<float>(AmountVal)));
     else {
       // FIXME: Handle long double.
       assert(InVal->getType() == llvm::Type::DoubleTy);
       NextVal = 
-        llvm::ConstantFP::get(InVal->getType(),
-                              llvm::APFloat(static_cast<double>(AmountVal)));
+        llvm::ConstantFP::get(llvm::APFloat(static_cast<double>(AmountVal)));
     }
     NextVal = Builder.CreateAdd(InVal, NextVal, isInc ? "inc" : "dec");
   }