Added reverse iterators for the body of CompountStmt. These are useful for

CFG construction (among other potential uses).

llvm-svn: 41248
This commit is contained in:
Ted Kremenek 2007-08-21 20:29:50 +00:00
parent ad4569eacb
commit 76c4ac2363
1 changed files with 10 additions and 1 deletions

View File

@ -123,6 +123,15 @@ public:
const_body_iterator body_end() const { return Body.end(); } const_body_iterator body_end() const { return Body.end(); }
const Stmt *body_back() const { return Body.back(); } 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); } void push_back(Stmt *S) { Body.push_back(S); }
static bool classof(const Stmt *T) { static bool classof(const Stmt *T) {