From ee0133dc6d195e7cf0324dd825c483e8a907ba28 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 16 Nov 2021 09:01:56 -0800 Subject: [llvm] Use range-for loops (NFC) --- llvm/lib/CodeGen/MachineBasicBlock.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp') diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index a56fb3f115d6..23c511aaa056 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -134,9 +134,8 @@ void ilist_callback_traits::addNodeToList( // Make sure the instructions have their operands in the reginfo lists. MachineRegisterInfo &RegInfo = MF.getRegInfo(); - for (MachineBasicBlock::instr_iterator - I = N->instr_begin(), E = N->instr_end(); I != E; ++I) - I->AddRegOperandsToUseLists(RegInfo); + for (MachineInstr &MI : N->instrs()) + MI.AddRegOperandsToUseLists(RegInfo); } void ilist_callback_traits::removeNodeFromList( -- cgit v1.2.3