diff options
author | Chris Lattner <sabre@nondot.org> | 2009-01-05 08:00:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-01-05 08:00:30 +0000 |
commit | 7c4a7bf582640c20acdcb04ebbc000c0c080abf0 (patch) | |
tree | 7465e7181df0e08e849cceb00ced1d4634b6b0c7 | |
parent | 46bf476be1c020e866cf5ea5ab4b708e2f67c7eb (diff) | |
download | external_llvm-7c4a7bf582640c20acdcb04ebbc000c0c080abf0.zip external_llvm-7c4a7bf582640c20acdcb04ebbc000c0c080abf0.tar.gz external_llvm-7c4a7bf582640c20acdcb04ebbc000c0c080abf0.tar.bz2 |
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
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index d2ce6ec..12bb659 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -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) |