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

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 23 10:47:20 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];
+
+  auto S = this;
----------------
joker-eph wrote:

```suggestion
  auto *S = this;
```

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


More information about the llvm-commits mailing list