Skip to content

Commit 52d1397

Browse files
committed
[LoongArch] Fix -Wunused-variable in LoongArchExpandPseudoInsts.cpp (NFC)
llvm-project/llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp:480:20: error: unused variable 'MF' [-Werror,-Wunused-variable] MachineFunction *MF = MBB.getParent(); ^ 1 error generated.
1 parent 054b5fc commit 52d1397

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,12 +477,11 @@ bool LoongArchExpandPseudo::expandLargeAddressLoad(
477477
break;
478478
}
479479

480-
MachineFunction *MF = MBB.getParent();
481480
MachineInstr &MI = *MBBI;
482481
DebugLoc DL = MI.getDebugLoc();
483482
Register ScratchReg = LoongArch::R20; // $t8
484483

485-
assert(MF->getSubtarget<LoongArchSubtarget>().is64Bit() &&
484+
assert(MBB.getParent()->getSubtarget<LoongArchSubtarget>().is64Bit() &&
486485
"Large code model requires LA64");
487486

488487
auto Part1 = BuildMI(MBB, MBBI, DL, TII->get(LoongArch::PCALAU12I), DestReg);

0 commit comments

Comments
 (0)