diff options
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/Localizer.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/GlobalISel/Localizer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/Localizer.cpp b/llvm/lib/CodeGen/GlobalISel/Localizer.cpp index d45fdae43f01..a1acc4195840 100644 --- a/llvm/lib/CodeGen/GlobalISel/Localizer.cpp +++ b/llvm/lib/CodeGen/GlobalISel/Localizer.cpp @@ -92,9 +92,8 @@ bool Localizer::localizeInterBlock(MachineFunction &MF, // Check if all the users of MI are local. // We are going to invalidation the list of use operands, so we // can't use range iterator. - for (auto MOIt = MRI->use_begin(Reg), MOItEnd = MRI->use_end(); - MOIt != MOItEnd;) { - MachineOperand &MOUse = *MOIt++; + for (MachineOperand &MOUse : + llvm::make_early_inc_range(MRI->use_operands(Reg))) { // Check if the use is already local. MachineBasicBlock *InsertMBB; LLVM_DEBUG(MachineInstr &MIUse = *MOUse.getParent(); |
