[cfe-commits] r48465 - /cfe/trunk/include/clang/AST/Stmt.h
Ted Kremenek
kremenek at apple.com
Mon Mar 17 14:05:33 PDT 2008
Author: kremenek
Date: Mon Mar 17 16:05:33 2008
New Revision: 48465
URL: http://llvm.org/viewvc/llvm-project?rev=48465&view=rev
Log:
Added "inputs" and "outputs" iterator (expression) for AsmStmt.
Modified:
cfe/trunk/include/clang/AST/Stmt.h
Modified: cfe/trunk/include/clang/AST/Stmt.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Stmt.h?rev=48465&r1=48464&r2=48465&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/trunk/include/clang/AST/Stmt.h Mon Mar 17 16:05:33 2008
@@ -781,6 +781,32 @@
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();
More information about the cfe-commits
mailing list