diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2021-12-02 21:49:08 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2022-05-14 11:43:49 +0000 |
commit | 4824e7fd18a1223177218d4aec1b3c6c5c4a444e (patch) | |
tree | 5ca6493b1b0bf6a41f257794c0116d5e50fbf37c /contrib/llvm-project/llvm/lib/Target/MSP430 | |
parent | 5e801ac66d24704442eba426ed13c3effb8a34e7 (diff) | |
parent | f65dcba83ce5035ab88a85fe17628b447eb56e1b (diff) |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Target/MSP430')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Target/MSP430/MSP430FrameLowering.cpp | 4 | ||||
-rw-r--r-- | contrib/llvm-project/llvm/lib/Target/MSP430/MSP430MCInstLower.cpp | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/contrib/llvm-project/llvm/lib/Target/MSP430/MSP430FrameLowering.cpp b/contrib/llvm-project/llvm/lib/Target/MSP430/MSP430FrameLowering.cpp index a83a5d2dfcc9..2a77a150f9aa 100644 --- a/contrib/llvm-project/llvm/lib/Target/MSP430/MSP430FrameLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/MSP430/MSP430FrameLowering.cpp @@ -211,8 +211,8 @@ bool MSP430FrameLowering::restoreCalleeSavedRegisters( MachineFunction &MF = *MBB.getParent(); const TargetInstrInfo &TII = *MF.getSubtarget().getInstrInfo(); - for (unsigned i = 0, e = CSI.size(); i != e; ++i) - BuildMI(MBB, MI, DL, TII.get(MSP430::POP16r), CSI[i].getReg()); + for (const CalleeSavedInfo &I : CSI) + BuildMI(MBB, MI, DL, TII.get(MSP430::POP16r), I.getReg()); return true; } diff --git a/contrib/llvm-project/llvm/lib/Target/MSP430/MSP430MCInstLower.cpp b/contrib/llvm-project/llvm/lib/Target/MSP430/MSP430MCInstLower.cpp index 1e57f33386e6..52c037de7660 100644 --- a/contrib/llvm-project/llvm/lib/Target/MSP430/MSP430MCInstLower.cpp +++ b/contrib/llvm-project/llvm/lib/Target/MSP430/MSP430MCInstLower.cpp @@ -115,9 +115,7 @@ LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const { void MSP430MCInstLower::Lower(const MachineInstr *MI, MCInst &OutMI) const { OutMI.setOpcode(MI->getOpcode()); - for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { - const MachineOperand &MO = MI->getOperand(i); - + for (const MachineOperand &MO : MI->operands()) { MCOperand MCOp; switch (MO.getType()) { default: |