diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-07-08 21:19:46 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-07-08 21:19:46 +0000 |
commit | 8efc5b4f04d61428511f8fca4623eb0909957b44 (patch) | |
tree | c4d29a1c44efc1b08764831b6b8349bf97f2b5f8 /llvm/lib/Target/MSP430/MSP430InstrInfo.cpp | |
parent | 664514f7fe1451c5a41e871e6174677f941c9548 (diff) | |
download | bcm5719-llvm-8efc5b4f04d61428511f8fca4623eb0909957b44.tar.gz bcm5719-llvm-8efc5b4f04d61428511f8fca4623eb0909957b44.zip |
MSP430: Avoid implicit iterator conversions, NFC
Avoid implicit conversions from MachineInstrBundleIIterator to
MachineInstr* in the MSP430 backend by preferring MachineInstr& over
MachineInstr* when a pointer isn't nullable.
llvm-svn: 274933
Diffstat (limited to 'llvm/lib/Target/MSP430/MSP430InstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/MSP430/MSP430InstrInfo.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp b/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp index 1b33268c3b1..fbbd8dc22e6 100644 --- a/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp +++ b/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp @@ -293,8 +293,8 @@ unsigned MSP430InstrInfo::InsertBranch(MachineBasicBlock &MBB, /// GetInstSize - Return the number of bytes of code the specified /// instruction may be. This returns the maximum number of bytes. /// -unsigned MSP430InstrInfo::GetInstSizeInBytes(const MachineInstr *MI) const { - const MCInstrDesc &Desc = MI->getDesc(); +unsigned MSP430InstrInfo::GetInstSizeInBytes(const MachineInstr &MI) const { + const MCInstrDesc &Desc = MI.getDesc(); switch (Desc.TSFlags & MSP430II::SizeMask) { default: @@ -307,14 +307,14 @@ unsigned MSP430InstrInfo::GetInstSizeInBytes(const MachineInstr *MI) const { case TargetOpcode::DBG_VALUE: return 0; case TargetOpcode::INLINEASM: { - const MachineFunction *MF = MI->getParent()->getParent(); + const MachineFunction *MF = MI.getParent()->getParent(); const TargetInstrInfo &TII = *MF->getSubtarget().getInstrInfo(); - return TII.getInlineAsmLength(MI->getOperand(0).getSymbolName(), + return TII.getInlineAsmLength(MI.getOperand(0).getSymbolName(), *MF->getTarget().getMCAsmInfo()); } } case MSP430II::SizeSpecial: - switch (MI->getOpcode()) { + switch (MI.getOpcode()) { default: llvm_unreachable("Unknown instruction size!"); case MSP430::SAR8r1c: case MSP430::SAR16r1c: |