[llvm-branch-commits] [llvm] [CodeGen] LiveIntervalUnions::Array Implement move constructor (PR #111357)
Akshat Oke via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Oct 7 21:46:31 PDT 2024
https://github.com/Akshat-Oke updated https://github.com/llvm/llvm-project/pull/111357
>From 47bb19208ed2de82109eb160ba6177b7f888be26 Mon Sep 17 00:00:00 2001
From: Akshat Oke <Akshat.Oke at amd.com>
Date: Mon, 7 Oct 2024 08:42:24 +0000
Subject: [PATCH] [CodeGen] LiveIntervalUnions::Array Implement move
constructor
---
llvm/include/llvm/CodeGen/LiveIntervalUnion.h | 7 +++++++
1 file changed, 7 insertions(+)
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);
More information about the llvm-branch-commits
mailing list