aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-11-16 09:01:56 -0800
committerKazu Hirata <kazu@google.com>2021-11-16 09:01:56 -0800
commitee0133dc6d195e7cf0324dd825c483e8a907ba28 (patch)
treeb1680bec5e28318dee95d9529cb9e2b76cfec4bf /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent30d87d4a5d02f00ef58ebc24a0ee5c6c370b8b4c (diff)
downloadllvm-ee0133dc6d195e7cf0324dd825c483e8a907ba28.zip
llvm-ee0133dc6d195e7cf0324dd825c483e8a907ba28.tar.gz
llvm-ee0133dc6d195e7cf0324dd825c483e8a907ba28.tar.bz2
[llvm] Use range-for loops (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index a56fb3f..23c511a 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -134,9 +134,8 @@ void ilist_callback_traits<MachineBasicBlock>::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<MachineBasicBlock>::removeNodeFromList(