Fix printing of loop information
authorChris Lattner <sabre@nondot.org>
Sun, 29 Sep 2002 21:43:04 +0000 (21:43 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 29 Sep 2002 21:43:04 +0000 (21:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3977 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/LoopInfo.cpp

index 479cbf43d1747cf63465044876258a6239e37782..1c3d5ee5658a1ec4137d77026aeb870b07e5ce74 100644 (file)
@@ -33,8 +33,8 @@ void Loop::print(std::ostream &OS) const {
   }
   OS << "\n";
 
-  std::copy(getSubLoops().begin(), getSubLoops().end(),
-            std::ostream_iterator<const Loop*>(OS, "\n"));
+  for (unsigned i = 0, e = getSubLoops().size(); i != e; ++i)
+    getSubLoops()[i]->print(OS);
 }
 
 //===----------------------------------------------------------------------===//