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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99102 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2010-03-20 22:36:38 +00:00
parent c6ab1901f9
commit f2de13f8d7

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;
}