llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-llvm-regalloc Author: Akshat Oke (Akshat-Oke) <details> <summary>Changes</summary> Solves the double free error. --- Full diff: https://github.com/llvm/llvm-project/pull/111357.diff 1 Files Affected: - (modified) llvm/include/llvm/CodeGen/LiveIntervalUnion.h (+7) ``````````diff diff --git a/llvm/include/llvm/CodeGen/LiveIntervalUnion.h b/llvm/include/llvm/CodeGen/LiveIntervalUnion.h index 81003455da4241..cc0f2a45bb182c 100644 --- a/llvm/include/llvm/CodeGen/LiveIntervalUnion.h +++ b/llvm/include/llvm/CodeGen/LiveIntervalUnion.h @@ -176,6 +176,13 @@ class LiveIntervalUnion { Array() = default; ~Array() { clear(); } + Array(Array &&Other) : Size(Other.Size), LIUs(Other.LIUs) { + Other.Size = 0; + Other.LIUs = nullptr; + } + + Array(const Array &) = delete; + // Initialize the array to have Size entries. // Reuse an existing allocation if the size matches. void init(LiveIntervalUnion::Allocator&, unsigned Size); `````````` </details> https://github.com/llvm/llvm-project/pull/111357 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits