diff --git a/llvm/include/llvm/ADT/EquivalenceClasses.h b/llvm/include/llvm/ADT/EquivalenceClasses.h --- a/llvm/include/llvm/ADT/EquivalenceClasses.h +++ b/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::const_iterator; + using iterator = + typename std::set::const_iterator; iterator begin() const { return TheMapping.begin(); } iterator end() const { return TheMapping.end(); } diff --git a/llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h b/llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h --- a/llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h +++ b/llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h @@ -51,10 +51,10 @@ } }; - using iterator = std::set::iterator; - using const_iterator = std::set::const_iterator; using edge = ProfiledCallGraphEdge; - using edges = std::set; + using edges = std::set; + 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::iterator; + using iterator = ProfiledCallGraphNode::iterator; // Constructor for non-CS profile. ProfiledCallGraph(SampleProfileMap &ProfileMap) {