Skip to content

Commit a55727f

Browse files
committed
[AVR] Avoid reusing the same variable name (NFC)
Apparently GCC 5.4 (a supported compiler) has a bug where it will use the "MachineInstr &MI" defined by the range-based for loop to evaluate the for loop expression. Pick a different variable name to avoid this. (cherry picked from commit f8f55f7)
1 parent c8bb177 commit a55727f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/AVR/AVRFrameLowering.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,11 @@ bool AVRFrameLowering::restoreCalleeSavedRegisters(
298298
/// Replace pseudo store instructions that pass arguments through the stack with
299299
/// real instructions.
300300
static void fixStackStores(MachineBasicBlock &MBB,
301-
MachineBasicBlock::iterator MI,
301+
MachineBasicBlock::iterator StartMI,
302302
const TargetInstrInfo &TII, Register FP) {
303303
// Iterate through the BB until we hit a call instruction or we reach the end.
304304
for (MachineInstr &MI :
305-
llvm::make_early_inc_range(llvm::make_range(MI, MBB.end()))) {
305+
llvm::make_early_inc_range(llvm::make_range(StartMI, MBB.end()))) {
306306
if (MI.isCall())
307307
break;
308308

0 commit comments

Comments
 (0)