Skip to content

Commit

Permalink
[Mips] Use MCRegisterClass::getRegister() instead of begin()+RegNo. NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
topperc committed Feb 16, 2025
1 parent d150101 commit 26fc2e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6404,7 +6404,7 @@ unsigned MipsAsmParser::getATReg(SMLoc Loc) {
}

unsigned MipsAsmParser::getReg(int RC, int RegNo) {
return *(getContext().getRegisterInfo()->getRegClass(RC).begin() + RegNo);
return getContext().getRegisterInfo()->getRegClass(RC).getRegister(RegNo);
}

bool MipsAsmParser::parseOperand(OperandVector &Operands, StringRef Mnemonic) {
Expand Down

0 comments on commit 26fc2e9

Please sign in to comment.