No need to hardcode SmallVector size.
authorDevang Patel <dpatel@apple.com>
Tue, 21 Aug 2007 16:39:43 +0000 (16:39 +0000)
committerDevang Patel <dpatel@apple.com>
Tue, 21 Aug 2007 16:39:43 +0000 (16:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41228 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/LoopInfo.h
lib/Analysis/LoopInfo.cpp

index 7dcfb60a374243c5ed6df9f251f046b78bc76a66..acb5fd6c7a4a23b022574fbdc4e0549ef1dd5e05 100644 (file)
@@ -112,18 +112,18 @@ public:
   /// outside of the loop.  These are the blocks _inside of the current loop_
   /// which branch out.  The returned list is always unique.
   ///
-  void getExitingBlocks(SmallVector<BasicBlock *, 8> &Blocks) const;
+  void getExitingBlocks(SmallVectorImpl<BasicBlock *> &Blocks) const;
 
   /// getExitBlocks - Return all of the successor blocks of this loop.  These
   /// are the blocks _outside of the current loop_ which are branched to.
   ///
-  void getExitBlocks(SmallVector<BasicBlock*, 8> &Blocks) const;
+  void getExitBlocks(SmallVectorImpl<BasicBlock* > &Blocks) const;
 
   /// getUniqueExitBlocks - Return all unique successor blocks of this loop. 
   /// These are the blocks _outside of the current loop_ which are branched to.
   /// This assumes that loop is in canonical form.
   ///
-  void getUniqueExitBlocks(SmallVector<BasicBlock*, 8> &ExitBlocks) const;
+  void getUniqueExitBlocks(SmallVectorImpl<BasicBlock*> &ExitBlocks) const;
 
   /// getLoopPreheader - If there is a preheader for this loop, return it.  A
   /// loop has a preheader if there is only one edge to the header of the loop
index 877bd4ae6762d2748c762ca0609dc66bbce2b2b5..e479edc6473b1f198ba4112e1660b383b7a13c6f 100644 (file)
@@ -350,7 +350,7 @@ void LoopInfo::removeBlock(BasicBlock *BB) {
 /// outside of the loop.  These are the blocks _inside of the current loop_
 /// which branch out.  The returned list is always unique.
 ///
-void Loop::getExitingBlocks(SmallVector<BasicBlock*, 8> &ExitingBlocks) const {
+void Loop::getExitingBlocks(SmallVectorImpl<BasicBlock*> &ExitingBlocks) const {
   // Sort the blocks vector so that we can use binary search to do quick
   // lookups.
   std::vector<BasicBlock*> LoopBBs(block_begin(), block_end());
@@ -369,7 +369,7 @@ void Loop::getExitingBlocks(SmallVector<BasicBlock*, 8> &ExitingBlocks) const {
 /// getExitBlocks - Return all of the successor blocks of this loop.  These
 /// are the blocks _outside of the current loop_ which are branched to.
 ///
-void Loop::getExitBlocks(SmallVector<BasicBlock*, 8> &ExitBlocks) const {
+void Loop::getExitBlocks(SmallVectorImpl<BasicBlock*> &ExitBlocks) const {
   // Sort the blocks vector so that we can use binary search to do quick
   // lookups.
   std::vector<BasicBlock*> LoopBBs(block_begin(), block_end());
@@ -387,7 +387,7 @@ void Loop::getExitBlocks(SmallVector<BasicBlock*, 8> &ExitBlocks) const {
 /// are the blocks _outside of the current loop_ which are branched to. This
 /// assumes that loop is in canonical form.
 //
-void Loop::getUniqueExitBlocks(SmallVector<BasicBlock*, 8> &ExitBlocks) const {
+void Loop::getUniqueExitBlocks(SmallVectorImpl<BasicBlock*> &ExitBlocks) const {
   // Sort the blocks vector so that we can use binary search to do quick
   // lookups.
   std::vector<BasicBlock*> LoopBBs(block_begin(), block_end());