diff options
| author | Tim Northover <tnorthover@apple.com> | 2019-05-29 20:46:38 +0000 |
|---|---|---|
| committer | Tim Northover <tnorthover@apple.com> | 2019-05-29 20:46:38 +0000 |
| commit | 71ee3d02372af7361eda0b59163cf92653ac2bbb (patch) | |
| tree | 6e62b423c129caa0b420c5e10382284d65898514 /llvm/lib/AsmParser | |
| parent | 4b281755ae4951ca83c287680b47d77433f3ee0a (diff) | |
| download | bcm5719-llvm-71ee3d02372af7361eda0b59163cf92653ac2bbb.tar.gz bcm5719-llvm-71ee3d02372af7361eda0b59163cf92653ac2bbb.zip | |
Revert "IR: add optional type to 'byval' function parameters"
The IRLinker doesn't delve into the new byval attribute when mapping types, and
this breaks LTO.
llvm-svn: 362029
Diffstat (limited to 'llvm/lib/AsmParser')
| -rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 24 | ||||
| -rw-r--r-- | llvm/lib/AsmParser/LLParser.h | 1 |
2 files changed, 1 insertions, 24 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 ]* ']' diff --git a/llvm/lib/AsmParser/LLParser.h b/llvm/lib/AsmParser/LLParser.h index ec4a61b5498..ad169afb935 100644 --- a/llvm/lib/AsmParser/LLParser.h +++ b/llvm/lib/AsmParser/LLParser.h @@ -339,7 +339,6 @@ namespace llvm { bool ParseFnAttributeValuePairs(AttrBuilder &B, std::vector<unsigned> &FwdRefAttrGrps, bool inAttrGrp, LocTy &BuiltinLoc); - bool ParseByValWithOptionalType(Type *&Result); // Module Summary Index Parsing. bool SkipModuleSummaryEntry(); |

