[llvm-commits] [llvm] r61721 - /llvm/trunk/lib/AsmParser/LLParser.cpp
Chris Lattner
sabre at nondot.org
Mon Jan 5 10:24:24 PST 2009
Author: lattner
Date: Mon Jan 5 12:24:23 2009
New Revision: 61721
URL: http://llvm.org/viewvc/llvm-project?rev=61721&view=rev
Log:
reject PR3281:crash10.ll with:
llvm-as: crash10.ll:3:35: floating point constant does not have type 'ppc_fp128'
"dumy" = fcmp ult ppc_fp128 "j",9209.4
^
Modified:
llvm/trunk/lib/AsmParser/LLParser.cpp
Modified: llvm/trunk/lib/AsmParser/LLParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=61721&r1=61720&r2=61721&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLParser.cpp Mon Jan 5 12:24:23 2009
@@ -1911,6 +1911,11 @@
&Ignored);
}
V = ConstantFP::get(ID.APFloatVal);
+
+ if (V->getType() != Ty)
+ return Error(ID.Loc, "floating point constant does not have type '" +
+ Ty->getDescription() + "'");
+
return false;
case ValID::t_Null:
if (!isa<PointerType>(Ty))
More information about the llvm-commits
mailing list