From ec2f7dccb1f30ae137f74e764e44c2332b0a2ec0 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Mon, 17 Mar 2008 21:05:33 +0000 Subject: [PATCH] Added "inputs" and "outputs" iterator (expression) for AsmStmt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48465 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/Stmt.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h index 12251f4ecc..78d2ffeab3 100644 --- a/include/clang/AST/Stmt.h +++ b/include/clang/AST/Stmt.h @@ -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(); -- 2.40.0