aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AsmParser/LLParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AsmParser/LLParser.cpp')
-rw-r--r--lib/AsmParser/LLParser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index 5c44502..4759d6f 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/lib/AsmParser/LLParser.cpp
@@ -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));