[llvm-commits] CVS: llvm/include/llvm/Analysis/LoopInfo.h

Chris Lattner lattner at cs.uiuc.edu
Sun Apr 18 18:37:01 PDT 2004


Changes in directory llvm/include/llvm/Analysis:

LoopInfo.h updated: 1.37 -> 1.38

---
Log message:

Provide an interface that is more convenient for iterating over the blocks
in a loop.


---
Diffs of the changes:  (+3 -0)

Index: llvm/include/llvm/Analysis/LoopInfo.h
diff -u llvm/include/llvm/Analysis/LoopInfo.h:1.37 llvm/include/llvm/Analysis/LoopInfo.h:1.38
--- llvm/include/llvm/Analysis/LoopInfo.h:1.37	Sun Apr 18 17:45:16 2004
+++ llvm/include/llvm/Analysis/LoopInfo.h	Sun Apr 18 18:37:03 2004
@@ -74,6 +74,9 @@
   /// 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.





More information about the llvm-commits mailing list