mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
Refuse metadata* type for function arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73010 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0da9975299
commit
00907c7d81
@ -1149,7 +1149,9 @@ bool LLParser::ParseArgumentList(std::vector<ArgInfo> &ArgList,
|
||||
Lex.Lex();
|
||||
}
|
||||
|
||||
if (!ArgTy->isFirstClassType() && !isa<OpaqueType>(ArgTy))
|
||||
if ((!ArgTy->isFirstClassType() && !isa<OpaqueType>(ArgTy)) ||
|
||||
(isa<PointerType>(ArgTy) &&
|
||||
cast<PointerType>(ArgTy)->getElementType() == Type::MetadataTy))
|
||||
return Error(TypeLoc, "invalid type for function argument");
|
||||
|
||||
ArgList.push_back(ArgInfo(TypeLoc, ArgTy, Attrs, Name));
|
||||
|
Loading…
Reference in New Issue
Block a user