diff options
Diffstat (limited to 'lib/AsmParser/LLParser.cpp')
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 3 |
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; |