projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0da9975
)
Refuse metadata* type for function arguments.
author
Nick Lewycky
<nicholas@mxc.ca>
Sun, 7 Jun 2009 01:45:11 +0000
(
01:45
+0000)
committer
Nick Lewycky
<nicholas@mxc.ca>
Sun, 7 Jun 2009 01:45:11 +0000
(
01:45
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73010
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/AsmParser/LLParser.cpp
patch
|
blob
|
history
diff --git
a/lib/AsmParser/LLParser.cpp
b/lib/AsmParser/LLParser.cpp
index 5c4450244c188fb2666eeaf91ffe47430aeae7f5..4759d6f19de6b0f7e9de963892f7344b7e576e8b 100644
(file)
--- 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));