================
@@ -483,6 +484,20 @@ class SymbolContextList {
// Member variables.
collection m_symbol_contexts; ///< The list of symbol contexts.
+private:
+ struct SymbolContextInfo {
+ static SymbolContext getEmptyKey();
+ static SymbolContext getTombstoneKey();
+ static unsigned getHashValue(const SymbolContext &sc);
+ static bool isEqual(const SymbolContext &lhs, const SymbolContext &rhs);
+ };
+
+ /// Threshold above which we switch from linear scan to hash-set lookup
+ /// for uniqueness checks.
+ static constexpr size_t kSetThreshold = 1024;
+
+ llvm::SmallDenseSet<SymbolContext, 1, SymbolContextInfo> m_lookup_set;
----------------
da-viper wrote:
Looking at the usages. It doesn't seem like the order is used. It uses the
index as a key to the SymbolContext.
https://github.com/llvm/llvm-project/pull/181952
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits