reject PR3281:crash01.ll with:

llvm-as: crash01.ll:1:9: invalid function return type
declare opaque @t()
        ^



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61678 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-01-05 08:00:30 +00:00
parent c8e222b9a4
commit 99bb315f32

View File

@ -2035,7 +2035,8 @@ bool LLParser::ParseFunctionHeader(Function *&Fn, bool isDefine) {
return Error(LinkageLoc, "invalid function linkage type");
}
if (!FunctionType::isValidReturnType(RetType))
if (!FunctionType::isValidReturnType(RetType) ||
isa<OpaqueType>(RetType))
return Error(RetTypeLoc, "invalid function return type");
if (Lex.getKind() != lltok::GlobalVar)