diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2009-06-07 01:45:11 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2009-06-07 01:45:11 +0000 |
commit | 00907c7d81eecb062b06905722fd233e7daa5e5a (patch) | |
tree | 1b8cf937900505da1d5dd7ffc2753768095ae9ad /lib/AsmParser | |
parent | 0da9975299aa68b34464cea4344102466743c28f (diff) | |
download | external_llvm-00907c7d81eecb062b06905722fd233e7daa5e5a.zip external_llvm-00907c7d81eecb062b06905722fd233e7daa5e5a.tar.gz external_llvm-00907c7d81eecb062b06905722fd233e7daa5e5a.tar.bz2 |
Refuse metadata* type for function arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73010 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 4 |
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)); |