diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2010-03-22 16:13:21 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2010-03-22 16:13:21 +0000 |
commit | fa72340ba096dbe0f765651e425c5c6aa8259931 (patch) | |
tree | 23a6ff9030e337c61ab46b891c4fa3d90aea6fcf /lib/Target/ARM/Thumb1InstrInfo.cpp | |
parent | bd85e8e3adc1637d0e301c78953a8bfa208bdcd7 (diff) | |
download | llvm-fa72340ba096dbe0f765651e425c5c6aa8259931.tar.gz llvm-fa72340ba096dbe0f765651e425c5c6aa8259931.tar.bz2 llvm-fa72340ba096dbe0f765651e425c5c6aa8259931.tar.xz |
Don't leak a MachineInstruction from Thumb1InstrInfo::restoreCalleeSavedRegisters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99182 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/Thumb1InstrInfo.cpp')
-rw-r--r-- | lib/Target/ARM/Thumb1InstrInfo.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/ARM/Thumb1InstrInfo.cpp b/lib/Target/ARM/Thumb1InstrInfo.cpp index 29ae631269..ad98839ce2 100644 --- a/lib/Target/ARM/Thumb1InstrInfo.cpp +++ b/lib/Target/ARM/Thumb1InstrInfo.cpp @@ -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; } |