summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeEmitterGen.cpp
diff options
context:
space:
mode:
authorEvandro Menezes <emenezes@codeaurora.org>2012-11-09 21:27:03 +0000
committerEvandro Menezes <emenezes@codeaurora.org>2012-11-09 21:27:03 +0000
commit03789a9ec7fe4df8ca0dc0e516dfaad566dadcd8 (patch)
treedd757c512156af4a1eec31c00cbdb87bf2f50930 /llvm/utils/TableGen/CodeEmitterGen.cpp
parent567698a6ca828a7cbb9ad5b978656e5e437ebed6 (diff)
downloadbcm5719-llvm-03789a9ec7fe4df8ca0dc0e516dfaad566dadcd8.tar.gz
bcm5719-llvm-03789a9ec7fe4df8ca0dc0e516dfaad566dadcd8.zip
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. llvm-svn: 167635
Diffstat (limited to 'llvm/utils/TableGen/CodeEmitterGen.cpp')
-rw-r--r--llvm/utils/TableGen/CodeEmitterGen.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/CodeEmitterGen.cpp b/llvm/utils/TableGen/CodeEmitterGen.cpp
index bcca15cd57e..3e4f626d486 100644
--- a/llvm/utils/TableGen/CodeEmitterGen.cpp
+++ b/llvm/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++;
}
OpenPOWER on IntegriCloud