From: Benjamin Kramer Date: Mon, 9 May 2016 10:31:17 +0000 (+0000) Subject: Revert "[Mips] Fix use after free." X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc38c49428a8b5394ca5607709a43df571e9f339;p=llvm Revert "[Mips] Fix use after free." Fixes use after free but breaks tests. This reverts commit r268901. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268902 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp index aed0004e2a1..1b61535c75a 100644 --- a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -4693,7 +4693,8 @@ MipsAsmParser::parseRegisterPair(OperandVector &Operands) { SMLoc E = Parser.getTok().getLoc(); MipsOperand &Op = static_cast(*Operands.back()); - Operands.back() = MipsOperand::CreateRegPair(Op, S, E, *this); + Operands.pop_back(); + Operands.push_back(MipsOperand::CreateRegPair(Op, S, E, *this)); return MatchOperand_Success; }