From 6cd8c9a9d684698a0a9140db22da8cd8a5f73f76 Mon Sep 17 00:00:00 2001 From: Job Noorman Date: Tue, 16 Aug 2016 08:41:35 +0000 Subject: [PATCH] [AVR] Fix compile errors Differential Revision: https://reviews.llvm.org/D23450 llvm-svn: 278784 --- llvm/lib/Target/AVR/AVRInstrInfo.cpp | 8 ++++---- llvm/lib/Target/AVR/AVRInstrInfo.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/llvm/lib/Target/AVR/AVRInstrInfo.cpp b/llvm/lib/Target/AVR/AVRInstrInfo.cpp index 35c0ea5..e2637383 100644 --- a/llvm/lib/Target/AVR/AVRInstrInfo.cpp +++ b/llvm/lib/Target/AVR/AVRInstrInfo.cpp @@ -439,8 +439,8 @@ bool AVRInstrInfo::ReverseBranchCondition( return false; } -unsigned AVRInstrInfo::getInstSizeInBytes(const MachineInstr *MI) const { - unsigned Opcode = MI->getOpcode(); +unsigned AVRInstrInfo::getInstSizeInBytes(const MachineInstr &MI) const { + unsigned Opcode = MI.getOpcode(); switch (Opcode) { // A regular instruction @@ -454,10 +454,10 @@ unsigned AVRInstrInfo::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 AVRTargetMachine &TM = static_cast(MF->getTarget()); const TargetInstrInfo &TII = *TM.getSubtargetImpl()->getInstrInfo(); - return TII.getInlineAsmLength(MI->getOperand(0).getSymbolName(), + return TII.getInlineAsmLength(MI.getOperand(0).getSymbolName(), *TM.getMCAsmInfo()); } } diff --git a/llvm/lib/Target/AVR/AVRInstrInfo.h b/llvm/lib/Target/AVR/AVRInstrInfo.h index 2bcbe01..468bf9a 100644 --- a/llvm/lib/Target/AVR/AVRInstrInfo.h +++ b/llvm/lib/Target/AVR/AVRInstrInfo.h @@ -70,7 +70,7 @@ public: const MCInstrDesc &getBrCond(AVRCC::CondCodes CC) const; AVRCC::CondCodes getCondFromBranchOpc(unsigned Opc) const; AVRCC::CondCodes getOppositeCondition(AVRCC::CondCodes CC) const; - unsigned getInstSizeInBytes(const MachineInstr *MI) const override; + unsigned getInstSizeInBytes(const MachineInstr &MI) const override; void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const DebugLoc &DL, unsigned DestReg, unsigned SrcReg, -- 2.7.4