forked from OSchip/llvm-project
[PowerPC] Added an assert to make sure that the MBBI iterator is valid.
The function createTailCallBranchInstr assumes that the iterator MBBI is valid. However, only one use of MBBI is guarded in the function. Fix this by adding an assert. Differential Revision: https://reviews.llvm.org/D41358 llvm-svn: 321205
This commit is contained in:
parent
a869856c60
commit
4241821848
|
@ -1531,11 +1531,11 @@ void PPCFrameLowering::emitEpilogue(MachineFunction &MF,
|
|||
|
||||
void PPCFrameLowering::createTailCallBranchInstr(MachineBasicBlock &MBB) const {
|
||||
MachineBasicBlock::iterator MBBI = MBB.getFirstTerminator();
|
||||
DebugLoc dl;
|
||||
|
||||
if (MBBI != MBB.end())
|
||||
dl = MBBI->getDebugLoc();
|
||||
// If we got this far a first terminator should exist.
|
||||
assert(MBBI != MBB.end() && "Failed to find the first terminator.");
|
||||
|
||||
DebugLoc dl = MBBI->getDebugLoc();
|
||||
const PPCInstrInfo &TII = *Subtarget.getInstrInfo();
|
||||
|
||||
// Create branch instruction for pseudo tail call return instruction
|
||||
|
|
Loading…
Reference in New Issue