Skip to content

Commit 6299681

Browse files
committed
[RISCV] Remove unnecessary cast to RISCVTargetMachine in getInstSizeInBytes. NFC
getMCAsmInfo is a method on the base class so we don't need a cast here.
1 parent a38d5e0 commit 6299681

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfo.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1468,9 +1468,8 @@ unsigned RISCVInstrInfo::getInstSizeInBytes(const MachineInstr &MI) const {
14681468
if (Opcode == TargetOpcode::INLINEASM ||
14691469
Opcode == TargetOpcode::INLINEASM_BR) {
14701470
const MachineFunction &MF = *MI.getParent()->getParent();
1471-
const auto &TM = static_cast<const RISCVTargetMachine &>(MF.getTarget());
14721471
return getInlineAsmLength(MI.getOperand(0).getSymbolName(),
1473-
*TM.getMCAsmInfo());
1472+
*MF.getTarget().getMCAsmInfo());
14741473
}
14751474

14761475
if (!MI.memoperands_empty()) {

0 commit comments

Comments
 (0)