git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135169
91177308-0d34-0410-b5e6-
96231b3b80d8
// The source register for the shift has already been added to the
// operand list, so we need to pop it off and combine it into the shifted
// register operand instead.
- ARMOperand *PrevOp = (ARMOperand*)Operands.pop_back_val();
+ OwningPtr<ARMOperand> PrevOp((ARMOperand*)Operands.pop_back_val());
if (!PrevOp->isReg())
return Error(PrevOp->getStartLoc(), "shift must be of a register");
int SrcReg = PrevOp->getReg();