This is an archive of the discontinued LLVM Phabricator instance.

[llvm][clang][bolt][NFC] Use llvm::less_first() when applicable
ClosedPublic

Authored by steakhal on May 20 2022, 7:33 AM.

Details

Summary

One could reuse this functor instead of rolling out your own version.
There were a couple other cases where the code was similar, but not
quite the same, such as it might have an assertion in the lambda or other
constructs. Thus, I've not touched any of those, as it might change the
behavior in some way.

As per https://discourse.llvm.org/t/submitting-simple-nfc-patches/62640/3?u=steakhal
Chris Lattner

LLVM intentionally has a “yes, you can apply common sense judgement to
things” policy when it comes to code review. If you are doing mechanical
patches (e.g. adopting less_first) that apply to the entire monorepo,
then you don’t need everyone in the monorepo to sign off on it. Having
some +1 validation from someone is useful, but you don’t need everyone
whose code you touch to weigh in.

Diff Detail

Event Timeline

steakhal created this revision.May 20 2022, 7:33 AM
Herald added a reviewer: rafauler. · View Herald Transcript
Herald added a reviewer: Amir. · View Herald Transcript
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
steakhal requested review of this revision.May 20 2022, 7:33 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 20 2022, 7:33 AM
This revision was not accepted when it landed; it landed in state Needs Review.May 27 2022, 2:15 AM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.

This patch LGTM other than the apparent build breakage