[llvm-commits] [llvm] r61679 - /llvm/trunk/lib/AsmParser/LLParser.cpp
Chris Lattner
sabre at nondot.org
Mon Jan 5 00:04:34 PST 2009
Author: lattner
Date: Mon Jan 5 02:04:33 2009
New Revision: 61679
URL: http://llvm.org/viewvc/llvm-project?rev=61679&view=rev
Log:
diagnose PR3281:crash02.ll with:
llvm-as: crash02.ll:1:62: invalid function return type
declare { <{ <{}>, void ([1898 x { void ()* }], opaque, ...) (), fp128 * }>, opaque } @t ()
^
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=61679&r1=61678&r2=61679&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLParser.cpp Mon Jan 5 02:04:33 2009
@@ -1136,6 +1136,9 @@
bool LLParser::ParseFunctionType(PATypeHolder &Result) {
assert(Lex.getKind() == lltok::lparen);
+ if (!FunctionType::isValidReturnType(Result))
+ return TokError("invalid function return type");
+
std::vector<ArgInfo> ArgList;
bool isVarArg;
unsigned Attrs;
More information about the llvm-commits
mailing list