From c731c97facb5ff56daceb724d75f1f14e8d01f39 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 3 Oct 2007 19:26:29 +0000 Subject: Use empty() member functions when that's what's being tested for instead of comparing begin() and end(). llvm-svn: 42585 --- llvm/lib/Analysis/LoopPass.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Analysis/LoopPass.cpp') diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp index 414769bff74..c53d85f1fdf 100644 --- a/llvm/lib/Analysis/LoopPass.cpp +++ b/llvm/lib/Analysis/LoopPass.cpp @@ -54,7 +54,7 @@ void LPPassManager::deleteLoopFromQueue(Loop *L) { } // 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 @@ void LPPassManager::deleteLoopFromQueue(Loop *L) { } // Move all of the subloops to the top-level. - while (L->begin() != L->end()) + while (!L->empty()) LI->addTopLevelLoop(L->removeChildLoop(L->end()-1)); } -- cgit v1.2.3