diff options
author | Chris Lattner <sabre@nondot.org> | 2009-01-05 18:24:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-01-05 18:24:23 +0000 |
commit | 8f57d29e0ca766199c5b9e3b1fb9c8f4d2d8be56 (patch) | |
tree | efdd0132f325cf37d6f6fc7ad3b95c23d3b9ac70 /llvm/lib/AsmParser | |
parent | 651252b0198e99af04173895f94eb2f363fa83a2 (diff) | |
download | bcm5719-llvm-8f57d29e0ca766199c5b9e3b1fb9c8f4d2d8be56.tar.gz bcm5719-llvm-8f57d29e0ca766199c5b9e3b1fb9c8f4d2d8be56.zip |
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
^
llvm-svn: 61721
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 27dbf8871a6..c13737aae52 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -1911,6 +1911,11 @@ bool LLParser::ConvertGlobalValIDToValue(const Type *Ty, ValID &ID, &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)) |