From baa54d4ac868a31ce5e33274dc80cf5106e7908e Mon Sep 17 00:00:00 2001 From: Alex Bradbury Date: Thu, 19 Oct 2017 16:09:20 +0000 Subject: [PATCH] [RISCV][NFC] Drop unused parameter from createImm helper in RISCVAsmParser llvm-svn: 316167 --- llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp index c907f6d3c84e..92acdd825d54 100644 --- a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp +++ b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp @@ -30,7 +30,6 @@ namespace { struct RISCVOperand; class RISCVAsmParser : public MCTargetAsmParser { - SMLoc getLoc() const { return getParser().getTok().getLoc(); } bool generateImmOutOfRangeError(OperandVector &Operands, uint64_t ErrorInfo, @@ -281,7 +280,7 @@ public: } static std::unique_ptr createImm(const MCExpr *Val, SMLoc S, - SMLoc E, MCContext &Ctx) { + SMLoc E) { auto Op = make_unique(Immediate); Op->Imm.Val = Val; Op->StartLoc = S; @@ -471,7 +470,7 @@ OperandMatchResultTy RISCVAsmParser::parseImmediate(OperandVector &Operands) { return parseOperandWithModifier(Operands); } - Operands.push_back(RISCVOperand::createImm(Res, S, E, getContext())); + Operands.push_back(RISCVOperand::createImm(Res, S, E)); return MatchOperand_Success; } @@ -511,7 +510,7 @@ RISCVAsmParser::parseOperandWithModifier(OperandVector &Operands) { } const MCExpr *ModExpr = RISCVMCExpr::create(SubExpr, VK, getContext()); - Operands.push_back(RISCVOperand::createImm(ModExpr, S, E, getContext())); + Operands.push_back(RISCVOperand::createImm(ModExpr, S, E)); return MatchOperand_Success; }