aboutsummaryrefslogtreecommitdiff
path: root/lib/AsmParser
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-06-17 17:37:13 +0000
committerChris Lattner <sabre@nondot.org>2011-06-17 17:37:13 +0000
commita16546a70bc8cdf609e9e10beb20925e54a88d77 (patch)
treea670fed5f8c73a1386a2e1d2a8e708256cf793bc /lib/AsmParser
parenta6591969ffa7b022656db25f33788fcf57361ac5 (diff)
Stop accepting and ignoring attributes in function types. Attributes are applied
to functions and call/invokes, not to types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133266 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r--lib/AsmParser/LLParser.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index 01b3877adb..a9d3c94391 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/lib/AsmParser/LLParser.cpp
@@ -1559,22 +1559,16 @@ bool LLParser::ParseFunctionType(PATypeHolder &Result) {
std::vector<ArgInfo> ArgList;
bool isVarArg;
- unsigned Attrs;
- if (ParseArgumentList(ArgList, isVarArg, true) ||
- // FIXME: Allow, but ignore attributes on function types!
- // FIXME: Remove in LLVM 3.0
- ParseOptionalAttrs(Attrs, 2))
+ if (ParseArgumentList(ArgList, isVarArg, true))
return true;
// Reject names on the arguments lists.
for (unsigned i = 0, e = ArgList.size(); i != e; ++i) {
if (!ArgList[i].Name.empty())
return Error(ArgList[i].Loc, "argument name invalid in function type");
- if (!ArgList[i].Attrs != 0) {
- // Allow but ignore attributes on function types; this permits
- // auto-upgrade.
- // FIXME: REJECT ATTRIBUTES ON FUNCTION TYPES in LLVM 3.0
- }
+ if (ArgList[i].Attrs != 0)
+ return Error(ArgList[i].Loc,
+ "argument attributes invalid in function type");
}
std::vector<const Type*> ArgListTy;