[llvm-commits] [llvm] r99102 - /llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
Daniel Dunbar
daniel at zuster.org
Sat Mar 20 15:36:38 PDT 2010
Author: ddunbar
Date: Sat Mar 20 17:36:38 2010
New Revision: 99102
URL: http://llvm.org/viewvc/llvm-project?rev=99102&view=rev
Log:
MC/X86: Fix an MCOperand link, when we parsing shrld $1,%eax and friends; I believe this fixes the last memory leaks under test/MC.
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=99102&r1=99101&r2=99102&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Sat Mar 20 17:36:38 2010
@@ -569,8 +569,10 @@
Operands.size() == 3 &&
static_cast<X86Operand*>(Operands[1])->isImm() &&
isa<MCConstantExpr>(static_cast<X86Operand*>(Operands[1])->getImm()) &&
- cast<MCConstantExpr>(static_cast<X86Operand*>(Operands[1])->getImm())->getValue() == 1)
+ cast<MCConstantExpr>(static_cast<X86Operand*>(Operands[1])->getImm())->getValue() == 1) {
+ delete Operands[1];
Operands.erase(Operands.begin() + 1);
+ }
return false;
}
More information about the llvm-commits
mailing list