Skip to content

Commit c6b5910

Browse files
committed
[CodeGen] LiveIntervalUnions::Array Implement move constructor
1 parent 834b820 commit c6b5910

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/include/llvm/CodeGen/LiveIntervalUnion.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,13 @@ class LiveIntervalUnion {
176176
Array() = default;
177177
~Array() { clear(); }
178178

179+
Array(Array &&Other) : Size(Other.Size), LIUs(Other.LIUs) {
180+
Other.Size = 0;
181+
Other.LIUs = nullptr;
182+
}
183+
184+
Array(const Array &) = delete;
185+
179186
// Initialize the array to have Size entries.
180187
// Reuse an existing allocation if the size matches.
181188
void init(LiveIntervalUnion::Allocator&, unsigned Size);

0 commit comments

Comments
 (0)