mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
Don't leak operands when putting them into a shift.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135169 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3b14a5c546
commit
eac0796542
@ -1085,7 +1085,7 @@ int ARMAsmParser::TryParseShiftRegister(
|
||||
// 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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user