aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveVariables.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-07-23 16:10:46 -0700
committerKazu Hirata <kazu@google.com>2022-07-23 16:10:46 -0700
commit7bfa06f6c0905aa2fb30f12784e942625696d440 (patch)
treed5806abb72a38013e0e430c2f38220113c9f3976 /llvm/lib/CodeGen/LiveVariables.cpp
parent3736a498d48c1a41de5a3a3966477c9ce627088d (diff)
downloadllvm-7bfa06f6c0905aa2fb30f12784e942625696d440.zip
llvm-7bfa06f6c0905aa2fb30f12784e942625696d440.tar.gz
llvm-7bfa06f6c0905aa2fb30f12784e942625696d440.tar.bz2
[CodeGen] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/LiveVariables.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveVariables.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp
index 94bdfab..4025017 100644
--- a/llvm/lib/CodeGen/LiveVariables.cpp
+++ b/llvm/lib/CodeGen/LiveVariables.cpp
@@ -758,8 +758,7 @@ void LiveVariables::replaceKillInstruction(Register Reg, MachineInstr &OldMI,
/// removeVirtualRegistersKilled - Remove all killed info for the specified
/// instruction.
void LiveVariables::removeVirtualRegistersKilled(MachineInstr &MI) {
- for (unsigned i = 0, e = MI.getNumOperands(); i != e; ++i) {
- MachineOperand &MO = MI.getOperand(i);
+ for (MachineOperand &MO : MI.operands()) {
if (MO.isReg() && MO.isKill()) {
MO.setIsKill(false);
Register Reg = MO.getReg();