[llvm] r208400 - [asan] Stop leaking X86Operands.
Benjamin Kramer
benny.kra at googlemail.com
Fri May 9 02:48:03 PDT 2014
Author: d0k
Date: Fri May 9 04:48:03 2014
New Revision: 208400
URL: http://llvm.org/viewvc/llvm-project?rev=208400&view=rev
Log:
[asan] Stop leaking X86Operands.
Modified:
llvm/trunk/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp
Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp?rev=208400&r1=208399&r2=208400&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp Fri May 9 04:48:03 2014
@@ -192,8 +192,8 @@ void X86AddressSanitizer64::InstrumentMe
Inst.addOperand(MCOperand::CreateReg(X86::RSP));
const MCExpr *Disp = MCConstantExpr::Create(-128, Ctx);
- X86Operand *Op =
- X86Operand::CreateMem(0, Disp, X86::RSP, 0, 1, SMLoc(), SMLoc());
+ std::unique_ptr<X86Operand> Op(
+ X86Operand::CreateMem(0, Disp, X86::RSP, 0, 1, SMLoc(), SMLoc()));
Op->addMemOperands(Inst, 5);
EmitInstruction(Out, Inst);
}
@@ -221,8 +221,8 @@ void X86AddressSanitizer64::InstrumentMe
Inst.addOperand(MCOperand::CreateReg(X86::RSP));
const MCExpr *Disp = MCConstantExpr::Create(128, Ctx);
- X86Operand *Op =
- X86Operand::CreateMem(0, Disp, X86::RSP, 0, 1, SMLoc(), SMLoc());
+ std::unique_ptr<X86Operand> Op(
+ X86Operand::CreateMem(0, Disp, X86::RSP, 0, 1, SMLoc(), SMLoc()));
Op->addMemOperands(Inst, 5);
EmitInstruction(Out, Inst);
}
More information about the llvm-commits
mailing list