[Mips] Fix use after free.

llvm-svn: 268901
This commit is contained in:
Benjamin Kramer 2016-05-09 10:21:56 +00:00
parent 3d00056515
commit 5e2e8ddb2e
1 changed files with 1 additions and 2 deletions

View File

@ -4693,8 +4693,7 @@ MipsAsmParser::parseRegisterPair(OperandVector &Operands) {
SMLoc E = Parser.getTok().getLoc();
MipsOperand &Op = static_cast<MipsOperand &>(*Operands.back());
Operands.pop_back();
Operands.push_back(MipsOperand::CreateRegPair(Op, S, E, *this));
Operands.back() = MipsOperand::CreateRegPair(Op, S, E, *this);
return MatchOperand_Success;
}