Provide an interface that is more convenient for iterating over the blocks
in a loop. llvm-svn: 13052
This commit is contained in:
parent
fc44a25bcb
commit
732b5d5bba
|
@ -74,6 +74,9 @@ public:
|
||||||
/// getBlocks - Get a list of the basic blocks which make up this loop.
|
/// getBlocks - Get a list of the basic blocks which make up this loop.
|
||||||
///
|
///
|
||||||
const std::vector<BasicBlock*> &getBlocks() const { return Blocks; }
|
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
|
/// isLoopExit - True if terminator in the block can branch to another block
|
||||||
/// that is outside of the current loop.
|
/// that is outside of the current loop.
|
||||||
|
|
Loading…
Reference in New Issue