Use empty() member functions when that's what's being tested for instead
of comparing begin() and end().

llvm-svn: 42585
diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp
index 414769b..c53d85f 100644
--- a/llvm/lib/Analysis/LoopPass.cpp
+++ b/llvm/lib/Analysis/LoopPass.cpp
@@ -54,7 +54,7 @@
     }
     
     // Move all subloops into the parent loop.
-    while (L->begin() != L->end())
+    while (!L->empty())
       ParentLoop->addChildLoop(L->removeChildLoop(L->end()-1));
   } else {
     // Reparent all of the blocks in this loop.  Since BBLoop had no parent,
@@ -78,7 +78,7 @@
     }
 
     // Move all of the subloops to the top-level.
-    while (L->begin() != L->end())
+    while (!L->empty())
       LI->addTopLevelLoop(L->removeChildLoop(L->end()-1));
   }