[llvm] [ADT] Use StorageT for temporary storage in DenseMapBase::grow (NFC) (PR #228802)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 3 22:49:07 PDT 2026
================
@@ -1111,27 +1094,28 @@ class DenseMapBase : public DebugEpochBase {
return llvm::densemap::detail::hasherFor<KeyT, KeyInfoT>();
}
- // Move key/value from Other to *this.
- // Other is left in a valid but empty state.
- LLVM_ATTRIBUTE_NOINLINE void moveFrom(DenseMapBase &Other) {
- assert(getNumEntries() == 0 && "moveFrom requires an empty destination");
- BucketT *OtherB = Other.getBuckets();
- UsedT *OtherU = Other.getUsed();
- const unsigned E = Other.getNumBuckets();
- UsedT *U = getUsed();
- BucketT *B = getBuckets();
- const unsigned Mask = getNumBuckets() - 1;
- llvm::densemap::detail::forEachUsed(OtherU, E, [&](unsigned I) {
+ // Move key/value from Src to Dst.
+ // Src is left in a valid but empty state.
----------------
MaskRay wrote:
Is this comment still correct?
https://github.com/llvm/llvm-project/pull/228802
More information about the llvm-commits
mailing list