summaryrefslogtreecommitdiff
path: root/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp')
-rw-r--r--llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp23
1 files changed, 10 insertions, 13 deletions
diff --git a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
index b4f99788410b..60075c819b29 100644
--- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
@@ -179,10 +179,9 @@ class MipsAsmParser : public MCTargetAsmParser {
bool MatchingInlineAsm) override;
/// Parse a register as used in CFI directives
- bool parseRegister(MCRegister &RegNo, SMLoc &StartLoc,
- SMLoc &EndLoc) override;
- OperandMatchResultTy tryParseRegister(MCRegister &RegNo, SMLoc &StartLoc,
- SMLoc &EndLoc) override;
+ bool parseRegister(MCRegister &Reg, SMLoc &StartLoc, SMLoc &EndLoc) override;
+ ParseStatus tryParseRegister(MCRegister &Reg, SMLoc &StartLoc,
+ SMLoc &EndLoc) override;
bool parseParenSuffix(StringRef Name, OperandVector &Operands);
@@ -6385,14 +6384,13 @@ bool MipsAsmParser::parseOperand(OperandVector &Operands, StringRef Mnemonic) {
return true;
}
-bool MipsAsmParser::parseRegister(MCRegister &RegNo, SMLoc &StartLoc,
+bool MipsAsmParser::parseRegister(MCRegister &Reg, SMLoc &StartLoc,
SMLoc &EndLoc) {
- return tryParseRegister(RegNo, StartLoc, EndLoc) != MatchOperand_Success;
+ return !tryParseRegister(Reg, StartLoc, EndLoc).isSuccess();
}
-OperandMatchResultTy MipsAsmParser::tryParseRegister(MCRegister &RegNo,
- SMLoc &StartLoc,
- SMLoc &EndLoc) {
+ParseStatus MipsAsmParser::tryParseRegister(MCRegister &Reg, SMLoc &StartLoc,
+ SMLoc &EndLoc) {
SmallVector<std::unique_ptr<MCParsedAsmOperand>, 1> Operands;
ParseStatus Res = parseAnyRegister(Operands);
if (Res.isSuccess()) {
@@ -6407,15 +6405,14 @@ OperandMatchResultTy MipsAsmParser::tryParseRegister(MCRegister &RegNo,
// register is a parse error.
if (Operand.isGPRAsmReg()) {
// Resolve to GPR32 or GPR64 appropriately.
- RegNo = isGP64bit() ? Operand.getGPR64Reg() : Operand.getGPR32Reg();
+ Reg = isGP64bit() ? Operand.getGPR64Reg() : Operand.getGPR32Reg();
}
- return (RegNo == (unsigned)-1) ? MatchOperand_NoMatch
- : MatchOperand_Success;
+ return (Reg == (unsigned)-1) ? ParseStatus::NoMatch : ParseStatus::Success;
}
assert(Operands.size() == 0);
- return (RegNo == (unsigned)-1) ? MatchOperand_NoMatch : MatchOperand_Success;
+ return (Reg == (unsigned)-1) ? ParseStatus::NoMatch : ParseStatus::Success;
}
bool MipsAsmParser::parseMemOffset(const MCExpr *&Res, bool isParenExpr) {