forked from OSchip/llvm-project
Added operator[] for CFGBlock. This provides random access to the statements
of a block. llvm-svn: 45984
This commit is contained in:
parent
49f980c334
commit
50fd838140
|
@ -103,7 +103,10 @@ public:
|
|||
|
||||
unsigned size() const { return Stmts.size(); }
|
||||
bool empty() const { return Stmts.empty(); }
|
||||
|
||||
|
||||
Stmt*& operator[](size_t i) { assert (i < size()); return Stmts[i]; }
|
||||
Stmt* operator[](size_t i) const { assert (i < size()); return Stmts[i]; }
|
||||
|
||||
// CFG iterators
|
||||
typedef AdjacentBlocks::iterator pred_iterator;
|
||||
typedef AdjacentBlocks::const_iterator const_pred_iterator;
|
||||
|
|
Loading…
Reference in New Issue