llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>

This patch replaces SmallSet&lt;T *, N&gt; with SmallPtrSet&lt;T *, N&gt;.  Note
that SmallSet.h "redirects" SmallSet to SmallPtrSet for pointer
element types:

  template &lt;typename PointeeType, unsigned N&gt;
  class SmallSet&lt;PointeeType*, N&gt; : public SmallPtrSet&lt;PointeeType*, 
N&gt; {};

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.


---
Full diff: https://github.com/llvm/llvm-project/pull/154366.diff


1 Files Affected:

- (modified) lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp (+1-1) 


``````````diff
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?");

``````````

</details>


https://github.com/llvm/llvm-project/pull/154366
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to