mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
getOperandNum(): error if specified operand number is out of range.
llvm-svn: 28775
This commit is contained in:
parent
c50df7da72
commit
fe3e6e1967
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user