[llvm] [llvm][ADT] Add invalidate method to ScopedHashTableScope (PR #193516)

lonely eagle via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 24 02:22:11 PDT 2026


================
@@ -257,6 +279,24 @@ ScopedHashTableScope<K, V, KInfo, Allocator>::~ScopedHashTableScope() {
   }
 }
 
+template <typename K, typename V, typename KInfo, typename Allocator>
+void ScopedHashTableScope<K, V, KInfo, Allocator>::invalidate(const K &key) {
+  if (!HT.TopLevelMap.contains(key))
+    return;
+  ScopedHashTableVal<K, V> *&ThisEntry = HT.TopLevelMap[key];
----------------
linuxlonelyeagle wrote:

Forgive my lack of familiarity with the container's internal erasure mechanism, but I think I understand what you mean.

https://github.com/llvm/llvm-project/pull/193516


More information about the llvm-commits mailing list