diff options
author | Kazu Hirata <kazu@google.com> | 2024-06-26 16:49:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-26 16:49:00 -0700 |
commit | dae061f1b2576a78fb706d4fdc7e30e37d1f3e3c (patch) | |
tree | b2c219c6fd7d2b54cef4e585919d80d9bb64127d /llvm/lib/CodeGen/LiveDebugVariables.cpp | |
parent | 1fa9f506d33a25c83f23862abd2400f1df3c413e (diff) | |
download | llvm-dae061f1b2576a78fb706d4fdc7e30e37d1f3e3c.zip llvm-dae061f1b2576a78fb706d4fdc7e30e37d1f3e3c.tar.gz llvm-dae061f1b2576a78fb706d4fdc7e30e37d1f3e3c.tar.bz2 |
[CodeGen] Use range-based for loops (NFC) (#96777)
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugVariables.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index 16d8e91..3224bed 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp @@ -764,9 +764,9 @@ void LDVImpl::print(raw_ostream &OS) { #endif void UserValue::mapVirtRegs(LDVImpl *LDV) { - for (unsigned i = 0, e = locations.size(); i != e; ++i) - if (locations[i].isReg() && locations[i].getReg().isVirtual()) - LDV->mapVirtReg(locations[i].getReg(), this); + for (const MachineOperand &MO : locations) + if (MO.isReg() && MO.getReg().isVirtual()) + LDV->mapVirtReg(MO.getReg(), this); } UserValue * @@ -1254,9 +1254,9 @@ void LDVImpl::computeIntervals() { LexicalScopes LS; LS.initialize(*MF); - for (unsigned i = 0, e = userValues.size(); i != e; ++i) { - userValues[i]->computeIntervals(MF->getRegInfo(), *TRI, *LIS, LS); - userValues[i]->mapVirtRegs(this); + for (const auto &UV : userValues) { + UV->computeIntervals(MF->getRegInfo(), *TRI, *LIS, LS); + UV->mapVirtRegs(this); } } |