mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
Refuse metadata* type for function arguments.
llvm-svn: 73010
This commit is contained in:
parent
2b6cb1684f
commit
3a8ea63343
@ -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…
x
Reference in New Issue
Block a user