From: Alex Bradbury Date: Thu, 19 Oct 2017 16:09:20 +0000 (+0000) Subject: [RISCV][NFC] Drop unused parameter from createImm helper in RISCVAsmParser X-Git-Tag: android-x86-7.1-r4~9531 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=695f682406eb7201c594377539e9856a78c93b44;p=android-x86%2Fexternal-llvm.git [RISCV][NFC] Drop unused parameter from createImm helper in RISCVAsmParser git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316167 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp b/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp index c907f6d3c84..92acdd825d5 100644 --- a/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp +++ b/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; }