ARM64AsmParser.cpp: Fix vg_leak in MC/ARM64/fp-encoding.s.

llvm-svn: 206279
This commit is contained in:
NAKAMURA Takumi 2014-04-15 13:22:11 +00:00
parent a3e4cebd96
commit 6091e1aed5
1 changed files with 2 additions and 0 deletions

View File

@ -4218,6 +4218,7 @@ bool ARM64AsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
if (Op->isVectorIndexD() && Op->getVectorIndex() == 1) {
SMLoc Loc = Op->getStartLoc();
Operands.pop_back();
delete Op;
Operands.push_back(
ARM64Operand::CreateToken("[", false, Loc, getContext()));
Operands.push_back(
@ -4239,6 +4240,7 @@ bool ARM64AsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
Operands.insert(
Operands.begin() + OpNo + 2,
ARM64Operand::CreateToken("]", false, Loc, getContext()));
delete Op;
}
}
}