[cfe-commits] r41248 - /cfe/trunk/include/clang/AST/Stmt.h
Ted Kremenek
kremenek at apple.com
Tue Aug 21 13:29:50 PDT 2007
Author: kremenek
Date: Tue Aug 21 15:29:50 2007
New Revision: 41248
URL: http://llvm.org/viewvc/llvm-project?rev=41248&view=rev
Log:
Added reverse iterators for the body of CompountStmt. These are useful for
CFG construction (among other potential uses).
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=41248&r1=41247&r2=41248&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/trunk/include/clang/AST/Stmt.h Tue Aug 21 15:29:50 2007
@@ -122,7 +122,16 @@
const_body_iterator body_begin() const { return Body.begin(); }
const_body_iterator body_end() const { return Body.end(); }
const Stmt *body_back() const { return Body.back(); }
-
+
+ typedef llvm::SmallVector<Stmt*, 16>::reverse_iterator reverse_body_iterator;
+ reverse_body_iterator body_rbegin() { return Body.rbegin(); }
+ reverse_body_iterator body_rend() { return Body.rend(); }
+
+ typedef llvm::SmallVector<Stmt*, 16>::const_reverse_iterator
+ const_reverse_body_iterator;
+ const_reverse_body_iterator body_rbegin() const { return Body.rbegin(); }
+ const_reverse_body_iterator body_rend() const { return Body.rend(); }
+
void push_back(Stmt *S) { Body.push_back(S); }
static bool classof(const Stmt *T) {
More information about the cfe-commits
mailing list