[llvm-commits] [llvm] r113200 - /llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
Benjamin Kramer
benny.kra at googlemail.com
Tue Sep 7 07:40:59 PDT 2010
Author: d0k
Date: Tue Sep 7 09:40:58 2010
New Revision: 113200
URL: http://llvm.org/viewvc/llvm-project?rev=113200&view=rev
Log:
Don't leak the old operand when transforming "sldt" into "sldtw".
Modified:
llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=113200&r1=113199&r2=113200&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Tue Sep 7 09:40:58 2010
@@ -837,8 +837,10 @@
// effect (both store to a 16-bit mem). Force to sldtw to avoid ambiguity
// errors, since its encoding is the most compact.
if (Name == "sldt" && Operands.size() == 2 &&
- static_cast<X86Operand*>(Operands[1])->isMem())
+ static_cast<X86Operand*>(Operands[1])->isMem()) {
+ delete Operands[0];
Operands[0] = X86Operand::CreateToken("sldtw", NameLoc);
+ }
return false;
}
More information about the llvm-commits
mailing list