add accessors

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22007 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-05-14 06:19:11 +00:00
parent 0b2bc7e36f
commit 50f5a51f41

View File

@ -491,6 +491,10 @@ public:
assert(Num < Operands.size() && "Invalid child # of SDNode!");
return Operands[Num];
}
typedef std::vector<SDOperand>::const_iterator op_iterator;
op_iterator op_begin() const { return Operands.begin(); }
op_iterator op_end() const { return Operands.end(); }
/// getNumValues - Return the number of values defined/returned by this
/// operator.
@ -503,6 +507,10 @@ public:
assert(ResNo < Values.size() && "Illegal result number!");
return Values[ResNo];
}
typedef std::vector<MVT::ValueType>::const_iterator value_iterator;
value_iterator value_begin() const { return Values.begin(); }
value_iterator value_end() const { return Values.end(); }
/// getOperationName - Return the opcode of this operation for printing.
///