From fa72340ba096dbe0f765651e425c5c6aa8259931 Mon Sep 17 00:00:00 2001 From: Jeffrey Yasskin Date: Mon, 22 Mar 2010 16:13:21 +0000 Subject: [PATCH] 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 --- lib/Target/ARM/Thumb1InstrInfo.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Target/ARM/Thumb1InstrInfo.cpp b/lib/Target/ARM/Thumb1InstrInfo.cpp index 29ae631269a..ad98839ce26 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; }