[llvm-branch-commits] [llvm] a55727f - [AVR] Avoid reusing the same variable name (NFC)
Nikita Popov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Feb 3 01:21:29 PST 2022
Author: Nikita Popov
Date: 2022-02-03T10:19:26+01:00
New Revision: a55727f334b39600bfc71144b11b42aae6b94e0b
URL: https://github.com/llvm/llvm-project/commit/a55727f334b39600bfc71144b11b42aae6b94e0b
DIFF: https://github.com/llvm/llvm-project/commit/a55727f334b39600bfc71144b11b42aae6b94e0b.diff
LOG: [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 f8f55f7e0343634e8cf0892883ce7132b7a0dc50)
Added:
Modified:
llvm/lib/Target/AVR/AVRFrameLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AVR/AVRFrameLowering.cpp b/llvm/lib/Target/AVR/AVRFrameLowering.cpp
index b3bc9ede205eb..42a6e4f55dc86 100644
--- a/llvm/lib/Target/AVR/AVRFrameLowering.cpp
+++ b/llvm/lib/Target/AVR/AVRFrameLowering.cpp
@@ -298,11 +298,11 @@ bool AVRFrameLowering::restoreCalleeSavedRegisters(
/// Replace pseudo store instructions that pass arguments through the stack with
/// real instructions.
static void fixStackStores(MachineBasicBlock &MBB,
- MachineBasicBlock::iterator MI,
+ MachineBasicBlock::iterator StartMI,
const TargetInstrInfo &TII, Register FP) {
// Iterate through the BB until we hit a call instruction or we reach the end.
for (MachineInstr &MI :
- llvm::make_early_inc_range(llvm::make_range(MI, MBB.end()))) {
+ llvm::make_early_inc_range(llvm::make_range(StartMI, MBB.end()))) {
if (MI.isCall())
break;
More information about the llvm-branch-commits
mailing list