forked from OSchip/llvm-project
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:
parent
ad4569eacb
commit
76c4ac2363
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue