Skip to content

Commit

Permalink
Don't leak a MachineInstruction from Thumb1InstrInfo::restoreCalleeSa…
Browse files Browse the repository at this point in the history
…vedRegisters.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99182 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
jyasskin committed Mar 22, 2010
1 parent bd85e8e commit fa72340
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Target/ARM/Thumb1InstrInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
// It's illegal to emit pop instruction without operands.
if (NumRegs)
MBB.insert(MI, &*MIB);
else
MF.DeleteMachineInstr(MIB);

return true;
}
Expand Down

0 comments on commit fa72340

Please sign in to comment.