Use Loop::block_iterator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52616 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp
index 3063a43..3267af7 100644
--- a/lib/Transforms/Utils/LoopSimplify.cpp
+++ b/lib/Transforms/Utils/LoopSimplify.cpp
@@ -460,8 +460,9 @@
   // L is now a subloop of our outer loop.
   NewOuter->addChildLoop(L);
 
-  for (unsigned i = 0, e = L->getBlocks().size(); i != e; ++i)
-    NewOuter->addBlockEntry(L->getBlocks()[i]);
+  for (Loop::block_iterator I = L->block_begin(), E = L->block_end();
+       I != E; ++I)
+    NewOuter->addBlockEntry(*I);
 
   // Determine which blocks should stay in L and which should be moved out to
   // the Outer loop now.