================
@@ -475,10 +483,17 @@ class SymbolContextList {
   void GetDescription(Stream *s, lldb::DescriptionLevel level,
                       Target *target) const;
 
-protected:
-  typedef std::vector<SymbolContext>
-      collection; ///< The collection type for the list.
-  typedef collection::const_iterator const_iterator;
+private:
+  struct SymbolContextInfo {
+    static SymbolContext getEmptyKey();
+    static SymbolContext getTombstoneKey();
+    static unsigned getHashValue(const SymbolContext &sc);
+    static bool isEqual(const SymbolContext &lhs, const SymbolContext &rhs);
+  };
+
+  using set_type = llvm::DenseSet<SymbolContext, SymbolContextInfo>;
+  using collection =
+      llvm::SetVector<SymbolContext, std::vector<SymbolContext>, set_type>;
----------------
Michael137 wrote:

Would `llvm::SmallVector<SymbolContext, 1>` be more suited here? If you suspect 
the lists to only contain a single-or-so element

https://github.com/llvm/llvm-project/pull/181952
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to