From 02a260aa11a2e1b2c14335274d3c42ca3f3eabc0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 20 Apr 2008 00:41:09 +0000 Subject: Switch to using Simplified ConstantFP::get API. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49977 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AsmParser/llvmAsmParser.y | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/AsmParser/llvmAsmParser.y') diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index beafcd2..a1abae3 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -408,12 +408,12 @@ static Value *getExistingVal(const Type *Ty, const ValID &D) { GenerateError("FP constant invalid for type"); return 0; } - // Lexer has no type info, so builds all float and double FP constants + // Lexer has no type info, so builds all float and double FP constants // as double. Fix this here. Long double does not need this. if (&D.ConstPoolFP->getSemantics() == &APFloat::IEEEdouble && Ty==Type::FloatTy) D.ConstPoolFP->convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven); - return ConstantFP::get(Ty, *D.ConstPoolFP); + return ConstantFP::get(*D.ConstPoolFP); case ValID::ConstNullVal: // Is it a null value? if (!isa(Ty)) { @@ -1867,7 +1867,7 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr // as double. Fix this here. Long double is done right. if (&$2->getSemantics()==&APFloat::IEEEdouble && $1==Type::FloatTy) $2->convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven); - $$ = ConstantFP::get($1, *$2); + $$ = ConstantFP::get(*$2); delete $2; CHECK_FOR_ERROR }; -- cgit v1.1