diff options
| author | Kazu Hirata <kazu@google.com> | 2024-07-12 01:37:15 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-12 01:37:15 -0700 |
| commit | 4570a34f929693e442c7d09dc6aef7e801c2dc1d (patch) | |
| tree | 8fc5a275d736c29ef16db80311d7b385485accc3 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
| parent | 6479a5a438a9545dd8f449be96d4024d0a08beba (diff) | |
[CodeGen] Use range-based for loops (NFC) (#98459)
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 5fe7a9d35dc9..90d2edebedd7 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -1484,10 +1484,9 @@ void MachineBasicBlock::ReplaceUsesOfBlockWith(MachineBasicBlock *Old, // Scan the operands of this machine instruction, replacing any uses of Old // with New. - for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) - if (I->getOperand(i).isMBB() && - I->getOperand(i).getMBB() == Old) - I->getOperand(i).setMBB(New); + for (MachineOperand &MO : I->operands()) + if (MO.isMBB() && MO.getMBB() == Old) + MO.setMBB(New); } // Update the successor information. |
