diff options
| author | Owen Anderson <resistor@mac.com> | 2015-10-09 18:40:15 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2015-10-09 18:40:15 +0000 |
| commit | dbd02a40d2fc8955d4c2c3069f8f1be4a5016772 (patch) | |
| tree | 788039c365769d763f09fdc2e87939bb1d375102 /llvm | |
| parent | b093d690627d7746d299a6634c81bb5979f6062c (diff) | |
| download | bcm5719-llvm-dbd02a40d2fc8955d4c2c3069f8f1be4a5016772.tar.gz bcm5719-llvm-dbd02a40d2fc8955d4c2c3069f8f1be4a5016772.zip | |
Add iterator ranges for blocks in a Loop.
llvm-svn: 249873
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/Analysis/LoopInfo.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/include/llvm/Analysis/LoopInfo.h b/llvm/include/llvm/Analysis/LoopInfo.h index 841c002a5c6..cc02c3db667 100644 --- a/llvm/include/llvm/Analysis/LoopInfo.h +++ b/llvm/include/llvm/Analysis/LoopInfo.h @@ -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 { |

