Skip to content

Commit 4f114f2

Browse files
committed
[Support] Recycler: Implement move constructor
1 parent 5e6aefd commit 4f114f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/include/llvm/Support/Recycler.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ class Recycler {
6060
// clear() before deleting the Recycler.
6161
assert(!FreeList && "Non-empty recycler deleted!");
6262
}
63+
Recycler(const Recycler &) = delete;
64+
Recycler(Recycler &&Other)
65+
: FreeList(std::exchange(Other.FreeList, nullptr)) {}
66+
Recycler() = default;
6367

6468
/// clear - Release all the tracked allocations to the allocator. The
6569
/// recycler must be free of any tracked allocations before being

0 commit comments

Comments
 (0)