summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-04-18 23:37:03 +0000
committerChris Lattner <sabre@nondot.org>2004-04-18 23:37:03 +0000
commit732b5d5bba44fb006b47500f138852cf3205a26f (patch)
tree9e80afc2eae5f3d3db5b5a1efc1ef52440267062
parentfc44a25bcbfcb8f7723361dc5bbb60015c7a9e45 (diff)
downloadbcm5719-llvm-732b5d5bba44fb006b47500f138852cf3205a26f.tar.gz
bcm5719-llvm-732b5d5bba44fb006b47500f138852cf3205a26f.zip
Provide an interface that is more convenient for iterating over the blocks
in a loop. llvm-svn: 13052
-rw-r--r--llvm/include/llvm/Analysis/LoopInfo.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/include/llvm/Analysis/LoopInfo.h b/llvm/include/llvm/Analysis/LoopInfo.h
index b85291f5516..5529be3929e 100644
--- a/llvm/include/llvm/Analysis/LoopInfo.h
+++ b/llvm/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.
OpenPOWER on IntegriCloud