diff options
author | Kazu Hirata <kazu@google.com> | 2021-11-25 08:55:16 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-11-25 08:55:16 -0800 |
commit | bfd5dd1568430a6c1500ed400c4de6028f6a2f3d (patch) | |
tree | ad874c947ae9a5af3dc61d104ad4fbc391160be5 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | 3e7452a812fa06c5eaae7d089891489222417e92 (diff) | |
download | llvm-bfd5dd1568430a6c1500ed400c4de6028f6a2f3d.zip llvm-bfd5dd1568430a6c1500ed400c4de6028f6a2f3d.tar.gz llvm-bfd5dd1568430a6c1500ed400c4de6028f6a2f3d.tar.bz2 |
[llvm] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 5c4f75e..aaa8043 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -1490,12 +1490,10 @@ bool MachineInstr::allDefsAreDead() const { /// instruction to this instruction. void MachineInstr::copyImplicitOps(MachineFunction &MF, const MachineInstr &MI) { - for (unsigned i = MI.getDesc().getNumOperands(), e = MI.getNumOperands(); - i != e; ++i) { - const MachineOperand &MO = MI.getOperand(i); + for (const MachineOperand &MO : + llvm::drop_begin(MI.operands(), MI.getDesc().getNumOperands())) if ((MO.isReg() && MO.isImplicit()) || MO.isRegMask()) addOperand(MF, MO); - } } bool MachineInstr::hasComplexRegisterTies() const { |