[llvm] [ADT] Derive FoldingSetNodeIDRef from ArrayRef<unsigned> (NFC) (PR #220824)
Yanzuo Liu via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 3 01:39:10 PDT 2026
================
@@ -119,13 +120,10 @@ template <typename T, typename Enable = void> struct FoldingSetTrait;
/// since the 32-element SmallVector is often much larger than necessary, and
/// the possibility of heap allocation means it requires a non-trivial
/// destructor call.
-class FoldingSetNodeIDRef {
- const unsigned *Data = nullptr;
- size_t Size = 0;
-
+class FoldingSetNodeIDRef : public ArrayRef<unsigned> {
public:
+ using ArrayRef<unsigned>::ArrayRef;
FoldingSetNodeIDRef() = default;
----------------
zwuis wrote:
```suggestion
```
https://github.com/llvm/llvm-project/pull/220824
More information about the llvm-commits
mailing list