[PATCH] D80473: [LoopUtils] Qulify std::find

Orivej Desh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 23 08:28:00 PDT 2020


orivej created this revision.
orivej added a reviewer: Whitney.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Fixes this build error:

  llvm/lib/Transforms/Utils/LoopUtils.cpp:679:26: error: no matching function for call to 'find'
        Loop::iterator I = find(ParentLoop->begin(), ParentLoop->end(), L);
                           ^~~~


Repository:
  rG LLVM Github Monorepo

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 = std::find(ParentLoop->begin(), ParentLoop->end(), 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 = std::find(LI->begin(), LI->end(), L);
       assert(I != LI->end() && "Couldn't find loop");
       LI->removeLoop(I);
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80473.265866.patch
Type: text/x-patch
Size: 892 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200523/5964ebe1/attachment-0001.bin>


More information about the llvm-commits mailing list