Added "inputs" and "outputs" iterator (expression) for AsmStmt.

llvm-svn: 48465
This commit is contained in:
Ted Kremenek 2008-03-17 21:05:33 +00:00
parent 1ac5215798
commit 8628318085
1 changed files with 26 additions and 0 deletions

View File

@ -781,6 +781,32 @@ public:
static bool classof(const Stmt *T) {return T->getStmtClass() == AsmStmtClass;}
static bool classof(const AsmStmt *) { return true; }
// Input expr iterators.
typedef Expr* const * inputs_iterator;
typedef const Expr* const* const_inputs_iterator;
inputs_iterator begin_inputs() { return &Exprs[0] + NumOutputs; }
inputs_iterator end_inputs() { return begin_inputs() + NumInputs; }
const_inputs_iterator begin_inputs() const { return &Exprs[0] + NumOutputs; }
const_inputs_iterator end_inputs() const { return begin_inputs() + NumInputs;}
// Output expr iterators.
typedef Expr* const * outputs_iterator;
typedef const Expr* const* const_outputs_iterator;
outputs_iterator begin_outputs() { return &Exprs[0]; }
outputs_iterator end_outputs() { return begin_outputs() + NumOutputs; }
const_outputs_iterator begin_outputs() const { return &Exprs[0]; }
const_outputs_iterator end_outputs() const {
return begin_outputs() + NumOutputs;
}
// Child iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();