projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b92d0c
)
getOperandNum(): error if specified operand number is out of range.
author
Evan Cheng
<evan.cheng@apple.com>
Tue, 13 Jun 2006 21:47:27 +0000
(21:47 +0000)
committer
Evan Cheng
<evan.cheng@apple.com>
Tue, 13 Jun 2006 21:47:27 +0000
(21:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28775
91177308
-0d34-0410-b5e6-
96231b3b80d8
utils/TableGen/DAGISelEmitter.cpp
patch
|
blob
|
history
diff --git
a/utils/TableGen/DAGISelEmitter.cpp
b/utils/TableGen/DAGISelEmitter.cpp
index 277d41e98545ca354b2d3fdc96e751486dc4ac65..34bcd360bf9d8efe114ca60da3366bfaf37e9be5 100644
(file)
--- a/
utils/TableGen/DAGISelEmitter.cpp
+++ b/
utils/TableGen/DAGISelEmitter.cpp
@@
-121,6
+121,13
@@
TreePatternNode *SDTypeConstraint::getOperandNum(unsigned OpNo,
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