[llvm] [ADT][TableGen] Add UniquingSet, a FoldingSet with typed keys (PR #219630)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 29 01:04:51 PDT 2026


================
@@ -159,6 +160,19 @@ template <typename T, typename Ctx> struct DefaultContextualFoldingSetTrait {
 template <typename T, typename Ctx>
 struct ContextualFoldingSetTrait : DefaultContextualFoldingSetTrait<T, Ctx> {};
 
+class FoldingSetInsertPos {
----------------
kazutakahirata wrote:

May I suggest something like this?
```suggestion
/// An opaque token returned by UniquingSet::find on a lookup miss, recording
/// the computed hash so that insert() can place the new node without re-hashing.
class FoldingSetInsertPos {
```

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


More information about the llvm-commits mailing list