diff options
author | Evandro Menezes <emenezes@codeaurora.org> | 2012-11-09 21:27:03 +0000 |
---|---|---|
committer | Evandro Menezes <emenezes@codeaurora.org> | 2012-11-09 21:27:03 +0000 |
commit | f1adbfe4e23ce08d1afa1245f2515e863813a6ac (patch) | |
tree | 5b8ed3ea6f86667445fe8b243c755dd69ae6d6ab /utils | |
parent | f1bb42152a0375f2889bd7329eada2b6422c837e (diff) |
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
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/CodeEmitterGen.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/utils/TableGen/CodeEmitterGen.cpp b/utils/TableGen/CodeEmitterGen.cpp index bcca15cd57..3e4f626d48 100644 --- a/utils/TableGen/CodeEmitterGen.cpp +++ b/utils/TableGen/CodeEmitterGen.cpp @@ -140,9 +140,7 @@ AddCodeToMergeInOperand(Record *R, BitsInit *BI, const std::string &VarName, while (NumberedOp < NumberOps && CGI.Operands.isFlatOperandNotEmitted(NumberedOp)) ++NumberedOp; - // If this operand has not been found, ignore it. - if (NumberedOp >= NumberOps) - return; + OpIdx = NumberedOp++; } |