[llvm] [llvm] Replace unordered_{map,set} with Dense{Map,Set}/SmallPtrSet (PR #202222)
Alexis Engelke via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 12 02:13:04 PDT 2026
================
@@ -1636,9 +1636,9 @@ class DisplayNode : public DisplayElement {
: DisplayElement(Colour), Content(Content) {}
// Iterator to the child nodes. Required by GraphWriter.
- using ChildIterator = std::unordered_set<DisplayNode *>::const_iterator;
- ChildIterator children_begin() const { return Children.cbegin(); }
- ChildIterator children_end() const { return Children.cend(); }
+ using ChildIterator = SmallPtrSet<DisplayNode *, 0>::const_iterator;
----------------
aengelke wrote:
```suggestion
using ChildIterator = SmallPtrSetImpl<DisplayNode *>::const_iterator;
```
https://github.com/llvm/llvm-project/pull/202222
More information about the llvm-commits
mailing list