diff options
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 0a9a09e644d..95646675cb2 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -1601,13 +1601,7 @@ bool LLParser::ParseOptionalParamAttrs(AttrBuilder &B) { B.addAlignmentAttr(Alignment); continue; } - case lltok::kw_byval: { - Type *Ty; - if (ParseByValWithOptionalType(Ty)) - return true; - B.addByValAttr(Ty); - continue; - } + case lltok::kw_byval: B.addAttribute(Attribute::ByVal); break; case lltok::kw_dereferenceable: { uint64_t Bytes; if (ParseOptionalDerefAttrBytes(lltok::kw_dereferenceable, Bytes)) @@ -2460,22 +2454,6 @@ bool LLParser::ParseParameterList(SmallVectorImpl<ParamInfo> &ArgList, return false; } -/// ParseByValWithOptionalType -/// ::= byval -/// ::= byval(<ty>) -bool LLParser::ParseByValWithOptionalType(Type *&Result) { - Result = nullptr; - if (!EatIfPresent(lltok::kw_byval)) - return true; - if (!EatIfPresent(lltok::lparen)) - return false; - if (ParseType(Result)) - return true; - if (!EatIfPresent(lltok::rparen)) - return Error(Lex.getLoc(), "expected ')'"); - return false; -} - /// ParseOptionalOperandBundles /// ::= /*empty*/ /// ::= '[' OperandBundle [, OperandBundle ]* ']' |