https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/154366
This patch replaces SmallSet<T *, N> with SmallPtrSet<T *, N>. Note that SmallSet.h "redirects" SmallSet to SmallPtrSet for pointer element types: template <typename PointeeType, unsigned N> class SmallSet<PointeeType*, N> : public SmallPtrSet<PointeeType*, N> {}; We only have 10 instances that rely on this "redirection". Since the redirection doesn't improve readability, this patch replaces SmallSet with SmallPtrSet for pointer element types. I'm planning to remove the redirection eventually. >From d03ee319a2b4965bab8f97293dab8a67e7712b42 Mon Sep 17 00:00:00 2001 From: Kazu Hirata <k...@google.com> Date: Mon, 18 Aug 2025 23:18:17 -0700 Subject: [PATCH] [lldb] Replace SmallSet with SmallPtrSet (NFC) This patch replaces SmallSet<T *, N> with SmallPtrSet<T *, N>. Note that SmallSet.h "redirects" SmallSet to SmallPtrSet for pointer element types: template <typename PointeeType, unsigned N> class SmallSet<PointeeType*, N> : public SmallPtrSet<PointeeType*, N> {}; We only have 10 instances that rely on this "redirection". Since the redirection doesn't improve readability, this patch replaces SmallSet with SmallPtrSet for pointer element types. I'm planning to remove the redirection eventually. --- lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp index a9345c79bd2bb..1bfa17f08a3b9 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp @@ -44,7 +44,7 @@ class ElaboratingDIEIterator // Container sizes are optimized for the case of following DW_AT_specification // and DW_AT_abstract_origin just once. llvm::SmallVector<DWARFDIE, 2> m_worklist; - llvm::SmallSet<DWARFDebugInfoEntry *, 3> m_seen; + llvm::SmallPtrSet<DWARFDebugInfoEntry *, 3> m_seen; void Next() { assert(!m_worklist.empty() && "Incrementing end iterator?"); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits