summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/Lexer.l.cvs
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/AsmParser/Lexer.l.cvs')
-rw-r--r--llvm/lib/AsmParser/Lexer.l.cvs6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/AsmParser/Lexer.l.cvs b/llvm/lib/AsmParser/Lexer.l.cvs
index 64e6d16eda8..390544d8c3d 100644
--- a/llvm/lib/AsmParser/Lexer.l.cvs
+++ b/llvm/lib/AsmParser/Lexer.l.cvs
@@ -437,8 +437,10 @@ shufflevector { RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); }
return GLOBALVAL_ID;
}
-{FPConstant} { llvmAsmlval.FPVal = atof(yytext); return FPVAL; }
-{HexFPConstant} { llvmAsmlval.FPVal = HexToFP(yytext); return FPVAL; }
+{FPConstant} { llvmAsmlval.FPVal = new APFloat(atof(yytext)); return FPVAL; }
+{HexFPConstant} { llvmAsmlval.FPVal = new APFloat(HexToFP(yytext));
+ return FPVAL;
+ }
<<EOF>> {
/* Make sure to free the internal buffers for flex when we are
OpenPOWER on IntegriCloud