[llvm] r278545 - [WebAssembly] Plug MachineMemOperand leaks.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 12 11:33:50 PDT 2016
Author: d0k
Date: Fri Aug 12 13:33:50 2016
New Revision: 278545
URL: http://llvm.org/viewvc/llvm-project?rev=278545&view=rev
Log:
[WebAssembly] Plug MachineMemOperand leaks.
Modified:
llvm/trunk/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp?rev=278545&r1=278544&r2=278545&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp Fri Aug 12 13:33:50 2016
@@ -93,9 +93,9 @@ static void writeSPToMemory(unsigned Src
BuildMI(MBB, InsertAddr, DL, TII->get(WebAssembly::CONST_I32), Zero)
.addImm(0);
- auto *MMO = new MachineMemOperand(MachinePointerInfo(MF.getPSVManager()
- .getExternalSymbolCallEntry(ES)),
- MachineMemOperand::MOStore, 4, 4);
+ MachineMemOperand *MMO = MF.getMachineMemOperand(
+ MachinePointerInfo(MF.getPSVManager().getExternalSymbolCallEntry(ES)),
+ MachineMemOperand::MOStore, 4, 4);
BuildMI(MBB, InsertStore, DL, TII->get(WebAssembly::STORE_I32), Drop)
.addExternalSymbol(SPSymbol)
.addReg(Zero)
@@ -143,9 +143,9 @@ void WebAssemblyFrameLowering::emitProlo
auto *SPSymbol = MF.createExternalSymbolName(ES);
BuildMI(MBB, InsertPt, DL, TII->get(WebAssembly::CONST_I32), Zero)
.addImm(0);
- auto *LoadMMO = new MachineMemOperand(MachinePointerInfo(MF.getPSVManager()
- .getExternalSymbolCallEntry(ES)),
- MachineMemOperand::MOLoad, 4, 4);
+ MachineMemOperand *LoadMMO = MF.getMachineMemOperand(
+ MachinePointerInfo(MF.getPSVManager().getExternalSymbolCallEntry(ES)),
+ MachineMemOperand::MOLoad, 4, 4);
// Load the SP value.
BuildMI(MBB, InsertPt, DL, TII->get(WebAssembly::LOAD_I32),
StackSize ? SPReg : (unsigned)WebAssembly::SP32)
More information about the llvm-commits
mailing list