diff --git a/llvm/include/llvm/Support/Memory.h b/llvm/include/llvm/Support/Memory.h index d7d60371d315f..c02a3cc14dc7d 100644 --- a/llvm/include/llvm/Support/Memory.h +++ b/llvm/include/llvm/Support/Memory.h @@ -137,7 +137,7 @@ namespace sys { class OwningMemoryBlock { public: OwningMemoryBlock() = default; - explicit OwningMemoryBlock(MemoryBlock M) : M(M) {} + explicit OwningMemoryBlock(MemoryBlock M) : M(std::move(M)) {} OwningMemoryBlock(OwningMemoryBlock &&Other) { M = Other.M; Other.M = MemoryBlock();