[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp
Evan Cheng
evan.cheng at apple.com
Tue Jun 13 14:47:40 PDT 2006
Changes in directory llvm/utils/TableGen:
DAGISelEmitter.cpp updated: 1.208 -> 1.209
---
Log message:
getOperandNum(): error if specified operand number is out of range.
---
Diffs of the changes: (+7 -0)
DAGISelEmitter.cpp | 7 +++++++
1 files changed, 7 insertions(+)
Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.208 llvm/utils/TableGen/DAGISelEmitter.cpp:1.209
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.208 Fri Jun 9 18:59:44 2006
+++ llvm/utils/TableGen/DAGISelEmitter.cpp Tue Jun 13 16:47:27 2006
@@ -121,6 +121,13 @@
assert(NumResults <= 1 &&
"We only work with nodes with zero or one result so far!");
+ if (OpNo >= (NumResults + N->getNumChildren())) {
+ std::cerr << "Invalid operand number " << OpNo << " ";
+ N->dump();
+ std::cerr << '\n';
+ exit(1);
+ }
+
if (OpNo < NumResults)
return N; // FIXME: need value #
else
More information about the llvm-commits
mailing list