mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Fix issue with invalid flat operand number
Avoid iterating over list of operands beyond the number of operands in it. PS: this fixes issue with revision #167634. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167635 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f1bb42152a
commit
f1adbfe4e2
@ -140,9 +140,7 @@ AddCodeToMergeInOperand(Record *R, BitsInit *BI, const std::string &VarName,
|
|||||||
while (NumberedOp < NumberOps &&
|
while (NumberedOp < NumberOps &&
|
||||||
CGI.Operands.isFlatOperandNotEmitted(NumberedOp))
|
CGI.Operands.isFlatOperandNotEmitted(NumberedOp))
|
||||||
++NumberedOp;
|
++NumberedOp;
|
||||||
// If this operand has not been found, ignore it.
|
|
||||||
if (NumberedOp >= NumberOps)
|
|
||||||
return;
|
|
||||||
OpIdx = NumberedOp++;
|
OpIdx = NumberedOp++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user