Skip to content

Commit 86690ce

Browse files
committed
[RISCV] Remove unnecessary calls MCRegister::id(). NFC
1 parent bcad050 commit 86690ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,7 @@ struct RISCVOperand final : public MCParsedAsmOperand {
12861286
static std::unique_ptr<RISCVOperand>
12871287
createReg(MCRegister Reg, SMLoc S, SMLoc E, bool IsGPRAsFPR = false) {
12881288
auto Op = std::make_unique<RISCVOperand>(KindTy::Register);
1289-
Op->Reg.RegNum = Reg.id();
1289+
Op->Reg.RegNum = Reg;
12901290
Op->Reg.IsGPRAsFPR = IsGPRAsFPR;
12911291
Op->StartLoc = S;
12921292
Op->EndLoc = E;
@@ -1358,8 +1358,8 @@ struct RISCVOperand final : public MCParsedAsmOperand {
13581358
static std::unique_ptr<RISCVOperand> createRegReg(MCRegister Reg1,
13591359
MCRegister Reg2, SMLoc S) {
13601360
auto Op = std::make_unique<RISCVOperand>(KindTy::RegReg);
1361-
Op->RegReg.Reg1 = Reg1.id();
1362-
Op->RegReg.Reg2 = Reg2.id();
1361+
Op->RegReg.Reg1 = Reg1;
1362+
Op->RegReg.Reg2 = Reg2;
13631363
Op->StartLoc = S;
13641364
Op->EndLoc = S;
13651365
return Op;

0 commit comments

Comments
 (0)