diff options
author | Kazu Hirata <kazu@google.com> | 2021-02-21 19:58:07 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-02-21 19:58:07 -0800 |
commit | ffba9e596d09a1d41f83102756e145b59d3f8495 (patch) | |
tree | b5cc2badfc7d3f85ea950a1c1335ab4279ca74be /llvm/lib/CodeGen/SplitKit.cpp | |
parent | 5032b5890bb43895012585bd29ff5c3fbd1a7812 (diff) | |
download | llvm-ffba9e596d09a1d41f83102756e145b59d3f8495.zip llvm-ffba9e596d09a1d41f83102756e145b59d3f8495.tar.gz llvm-ffba9e596d09a1d41f83102756e145b59d3f8495.tar.bz2 |
[CodeGen] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/SplitKit.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SplitKit.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SplitKit.cpp b/llvm/lib/CodeGen/SplitKit.cpp index 22cd63e..d778a9e 100644 --- a/llvm/lib/CodeGen/SplitKit.cpp +++ b/llvm/lib/CodeGen/SplitKit.cpp @@ -1270,11 +1270,9 @@ void SplitEditor::rewriteAssigned(bool ExtendRanges) { SmallVector<ExtPoint,4> ExtPoints; - for (MachineRegisterInfo::reg_iterator RI = MRI.reg_begin(Edit->getReg()), - RE = MRI.reg_end(); RI != RE;) { - MachineOperand &MO = *RI; + for (MachineOperand &MO : + llvm::make_early_inc_range(MRI.reg_operands(Edit->getReg()))) { MachineInstr *MI = MO.getParent(); - ++RI; // LiveDebugVariables should have handled all DBG_VALUE instructions. if (MI->isDebugValue()) { LLVM_DEBUG(dbgs() << "Zapping " << *MI); |