OSDN Git Service

[RISCV][NFC] Drop unused parameter from createImm helper in RISCVAsmParser
authorAlex Bradbury <asb@lowrisc.org>
Thu, 19 Oct 2017 16:09:20 +0000 (16:09 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Thu, 19 Oct 2017 16:09:20 +0000 (16:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316167 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp

index c907f6d..92acdd8 100644 (file)
@@ -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<RISCVOperand> createImm(const MCExpr *Val, SMLoc S,
-                                                 SMLoc E, MCContext &Ctx) {
+                                                 SMLoc E) {
     auto Op = make_unique<RISCVOperand>(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;
 }