This is an archive of the discontinued LLVM Phabricator instance.

[ADT, CSSPGO] Specify set comparer
ClosedPublic

Authored by hvdijk on Feb 14 2022, 5:20 PM.

Details

Summary

In _GLIBCXX_DEBUG builds, potentially implicitly enabled by LLVM_ENABLE_EXPENSIVE_CHECKS, std::set<A, B>::iterator and std::set<A, C>::iterator are distinct types that are not interconvertible. This change aligns the iterator types with the set types.

For ADT, this was added by D112052. For CSSPGO, this was added by D99146. Adding the authors/reviewers of those revisions in case they want to suggest a different way of fixing this.

Diff Detail

Event Timeline

hvdijk created this revision.Feb 14 2022, 5:20 PM
hvdijk requested review of this revision.Feb 14 2022, 5:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 14 2022, 5:20 PM
ormris removed a subscriber: ormris.Feb 15 2022, 10:43 AM
hoy added inline comments.Feb 23 2022, 10:36 AM
llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h
53–54

nit: using iterator = edges::iterator ?

hvdijk updated this revision to Diff 411254.Feb 24 2022, 4:41 PM

Simplify ProfiledCallGraphNode's types by reusing earlier types.

hvdijk marked an inline comment as done.Feb 24 2022, 4:42 PM
hvdijk added inline comments.
llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h
53–54

Sure, and if we're doing that we can simplify edges at the same time by defining it using edge. Done.

hvdijk marked an inline comment as done.Feb 24 2022, 4:42 PM
hoy accepted this revision.Feb 24 2022, 4:46 PM

LGTM, thanks for the fix.

This revision is now accepted and ready to land.Feb 24 2022, 4:46 PM
This revision was landed with ongoing or failed builds.Feb 24 2022, 4:59 PM
This revision was automatically updated to reflect the committed changes.