[PATCH] D80473: [LoopUtils] Use llvm::find

Whitney Tsang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 25 06:56:46 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG5d6c5b463cab: [LoopUtils] Use llvm::find (authored by Whitney).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80473/new/

https://reviews.llvm.org/D80473

Files:
  llvm/lib/Transforms/Utils/LoopUtils.cpp


Index: llvm/lib/Transforms/Utils/LoopUtils.cpp
===================================================================
--- llvm/lib/Transforms/Utils/LoopUtils.cpp
+++ llvm/lib/Transforms/Utils/LoopUtils.cpp
@@ -713,11 +713,11 @@
     // its parent. While removeLoop/removeChildLoop remove the given loop but
     // not relink its subloops, which is what we want.
     if (Loop *ParentLoop = L->getParentLoop()) {
-      Loop::iterator I = find(ParentLoop->begin(), ParentLoop->end(), L);
+      Loop::iterator I = find(*ParentLoop, L);
       assert(I != ParentLoop->end() && "Couldn't find loop");
       ParentLoop->removeChildLoop(I);
     } else {
-      Loop::iterator I = find(LI->begin(), LI->end(), L);
+      Loop::iterator I = find(*LI, L);
       assert(I != LI->end() && "Couldn't find loop");
       LI->removeLoop(I);
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80473.266013.patch
Type: text/x-patch
Size: 836 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200525/0ae438c0/attachment-0001.bin>


More information about the llvm-commits mailing list