[llvm-branch-commits] [llvm] [Support] Recycler: Implement move	constructor (PR #120555)
    via llvm-branch-commits 
    llvm-branch-commits at lists.llvm.org
       
    Thu Dec 19 06:33:21 PST 2024
    
    
  
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-support
Author: Akshat Oke (optimisan)
<details>
<summary>Changes</summary>
...discovered missing while running RAGreedy through the NPM which relies on moving analyses to the cache.
---
Full diff: https://github.com/llvm/llvm-project/pull/120555.diff
1 Files Affected:
- (modified) llvm/include/llvm/Support/Recycler.h (+4) 
``````````diff
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/120555
    
    
More information about the llvm-branch-commits
mailing list