diff options
author | Chris Lattner <sabre@nondot.org> | 2004-04-18 23:37:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-04-18 23:37:03 +0000 |
commit | 4e77cc46ac688e7bee98747049f90e19e2902227 (patch) | |
tree | d6d9283f398ca68fd2e75814c300d19820ad7570 /include/llvm | |
parent | 3280f7bd557250a448eb56edbddfc90c94a406e6 (diff) |
Provide an interface that is more convenient for iterating over the blocks
in a loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13052 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Analysis/LoopInfo.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index b85291f551..5529be3929 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -74,6 +74,9 @@ public: /// getBlocks - Get a list of the basic blocks which make up this loop. /// const std::vector<BasicBlock*> &getBlocks() const { return Blocks; } + typedef std::vector<BasicBlock*>::const_iterator block_iterator; + block_iterator block_begin() const { return Blocks.begin(); } + block_iterator block_end() const { return Blocks.end(); } /// isLoopExit - True if terminator in the block can branch to another block /// that is outside of the current loop. |