fix comment
[oota-llvm.git] / lib / Target / MSP430 / MSP430FrameLowering.cpp
index 9d3735314fd94b834c02d55c76c6c47b30f21fef..c99f4ab6c2f9c430dd07b7c45392187a90b4418b 100644 (file)
@@ -110,7 +110,7 @@ void MSP430FrameLowering::emitEpilogue(MachineFunction &MF,
   const MSP430InstrInfo &TII =
     *static_cast<const MSP430InstrInfo*>(MF.getTarget().getInstrInfo());
 
-  MachineBasicBlock::iterator MBBI = prior(MBB.end());
+  MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr();
   unsigned RetOpcode = MBBI->getOpcode();
   DebugLoc DL = MBBI->getDebugLoc();