[PATCH] D119798: [ADT, CSSPGO] Specify set comparer
Harald van Dijk via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 24 16:59:08 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG79787b903d15: [ADT, CSSPGO] Specify set comparer (authored by hvdijk).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119798/new/
https://reviews.llvm.org/D119798
Files:
llvm/include/llvm/ADT/EquivalenceClasses.h
llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h
Index: llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h
===================================================================
--- llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h
+++ llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h
@@ -51,10 +51,10 @@
}
};
- using iterator = std::set<ProfiledCallGraphEdge>::iterator;
- using const_iterator = std::set<ProfiledCallGraphEdge>::const_iterator;
using edge = ProfiledCallGraphEdge;
- using edges = std::set<ProfiledCallGraphEdge, ProfiledCallGraphEdgeComparer>;
+ using edges = std::set<edge, ProfiledCallGraphEdgeComparer>;
+ using iterator = edges::iterator;
+ using const_iterator = edges::const_iterator;
ProfiledCallGraphNode(StringRef FName = StringRef()) : Name(FName) {}
@@ -64,7 +64,7 @@
class ProfiledCallGraph {
public:
- using iterator = std::set<ProfiledCallGraphEdge>::iterator;
+ using iterator = ProfiledCallGraphNode::iterator;
// Constructor for non-CS profile.
ProfiledCallGraph(SampleProfileMap &ProfileMap) {
Index: llvm/include/llvm/ADT/EquivalenceClasses.h
===================================================================
--- llvm/include/llvm/ADT/EquivalenceClasses.h
+++ llvm/include/llvm/ADT/EquivalenceClasses.h
@@ -161,7 +161,8 @@
//
/// iterator* - Provides a way to iterate over all values in the set.
- using iterator = typename std::set<ECValue>::const_iterator;
+ using iterator =
+ typename std::set<ECValue, ECValueComparator>::const_iterator;
iterator begin() const { return TheMapping.begin(); }
iterator end() const { return TheMapping.end(); }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119798.411269.patch
Type: text/x-patch
Size: 1606 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220225/b25c3037/attachment.bin>
More information about the llvm-commits
mailing list