This is an archive of the discontinued LLVM Phabricator instance.

[LoopUtils] Use llvm::find
ClosedPublic

Authored by orivej on May 23 2020, 8:16 AM.

Details

Summary

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);
                         ^~~~

Diff Detail

Event Timeline

orivej created this revision.May 23 2020, 8:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2020, 8:16 AM
Whitney added inline comments.May 23 2020, 9:59 AM
llvm/lib/Transforms/Utils/LoopUtils.cpp
716

How about change to Loop::iterator I = find(ParentLoop, L)?

720

How about change to Loop::iterator I = find(LI, L);

orivej updated this revision to Diff 265878.May 23 2020, 11:45 AM
orivej retitled this revision from [LoopUtils] Qulify std::find to [LoopUtils] Use llvm::find.
orivej marked 2 inline comments as done.

I have tried that first, but I should have dereferenced too. Done.

Whitney accepted this revision.May 23 2020, 12:55 PM
This revision is now accepted and ready to land.May 23 2020, 12:55 PM

I do not have commit access, could you please commit on my behalf?

This revision was automatically updated to reflect the committed changes.