https://github.com/optimisan created https://github.com/llvm/llvm-project/pull/120555
None >From 982ad41024bc268a0a20c2458402035ed4ef0045 Mon Sep 17 00:00:00 2001 From: Akshat Oke <akshat....@amd.com> Date: Thu, 19 Dec 2024 06:57:46 +0000 Subject: [PATCH] [Support] Recycler: Implement move constructor --- llvm/include/llvm/Support/Recycler.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm/include/llvm/Support/Recycler.h b/llvm/include/llvm/Support/Recycler.h index bbd9ae321ae30c..693c6559ff2fdc 100644 --- a/llvm/include/llvm/Support/Recycler.h +++ b/llvm/include/llvm/Support/Recycler.h @@ -60,6 +60,10 @@ class Recycler { // clear() before deleting the Recycler. assert(!FreeList && "Non-empty recycler deleted!"); } + Recycler(const Recycler &) = delete; + Recycler(Recycler &&Other) + : FreeList(std::exchange(Other.FreeList, nullptr)) {} + Recycler() = default; /// clear - Release all the tracked allocations to the allocator. The /// recycler must be free of any tracked allocations before being _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits