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.

llvm-svn: 99102
This commit is contained in:
Daniel Dunbar 2010-03-20 22:36:38 +00:00
parent d9d5b315ab
commit fbd12cc36c
1 changed files with 3 additions and 1 deletions

View File

@ -569,8 +569,10 @@ ParseInstruction(const StringRef &Name, SMLoc NameLoc,
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;
}