aboutsummaryrefslogtreecommitdiff
path: root/lib/AsmParser/LLParser.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-05 08:04:33 +0000
committerChris Lattner <sabre@nondot.org>2009-01-05 08:04:33 +0000
commitd77d04c323f856b07c6e46450e7578dd09c0165f (patch)
treefec319527d0a87ec7f493d812105bc1c0f5dfeb7 /lib/AsmParser/LLParser.cpp
parent99bb315f32a5f82f9e4978345ee39177db973242 (diff)
diagnose PR3281:crash02.ll with:
llvm-as: crash02.ll:1:62: invalid function return type declare { <{ <{}>, void ([1898 x { void ()* }], opaque, ...) (), fp128 * }>, opaque } @t () ^ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61679 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/LLParser.cpp')
-rw-r--r--lib/AsmParser/LLParser.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index 12bb659dda..681a6622b3 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/lib/AsmParser/LLParser.cpp
@@ -1136,6 +1136,9 @@ bool LLParser::ParseArgumentList(std::vector<ArgInfo> &ArgList,
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;