mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-05 09:24:28 +00:00
Fix problems with empty basic blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5326 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -221,7 +221,7 @@ void PEI::insertPrologEpilogCode(MachineFunction &Fn) {
|
||||
const TargetInstrInfo &TII = Fn.getTarget().getInstrInfo();
|
||||
for (MachineFunction::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I) {
|
||||
// If last instruction is a return instruction, add an epilogue
|
||||
if (TII.isReturn(I->back()->getOpcode()))
|
||||
if (!I->empty() && TII.isReturn(I->back()->getOpcode()))
|
||||
Fn.getTarget().getRegisterInfo()->emitEpilogue(Fn, *I);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user