Fix printing of loop information


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3977 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/LoopInfo.cpp b/lib/Analysis/LoopInfo.cpp
index 479cbf4..1c3d5ee 100644
--- a/lib/Analysis/LoopInfo.cpp
+++ b/lib/Analysis/LoopInfo.cpp
@@ -33,8 +33,8 @@
   }
   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);
 }
 
 //===----------------------------------------------------------------------===//