Add iterator ranges for blocks in a Loop.

llvm-svn: 249873
This commit is contained in:
Owen Anderson 2015-10-09 18:40:15 +00:00
parent b093d69062
commit dbd02a40d2
1 changed files with 3 additions and 0 deletions

View File

@ -140,6 +140,9 @@ public:
typedef typename std::vector<BlockT*>::const_iterator block_iterator;
block_iterator block_begin() const { return Blocks.begin(); }
block_iterator block_end() const { return Blocks.end(); }
inline iterator_range<block_iterator> blocks() const {
return iterator_range<block_iterator>(block_begin(), block_end());
}
/// getNumBlocks - Get the number of blocks in this loop in constant time.
unsigned getNumBlocks() const {