Skip to content

Commit 425c4fe

Browse files
AmrDeveloperDanielCChen
authored andcommitted
[llvm][NFC] Remove redundant copy parameter (llvm#109859)
Remove redundant copy parameter and move it from `explicit OwningMemoryBlock(MemoryBlock M) : M(M) {}` to `explicit OwningMemoryBlock(MemoryBlock M) : M(std::move(m)) {}` Fixes: llvm#95640
1 parent 80112fa commit 425c4fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/Support/Memory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ namespace sys {
137137
class OwningMemoryBlock {
138138
public:
139139
OwningMemoryBlock() = default;
140-
explicit OwningMemoryBlock(MemoryBlock M) : M(M) {}
140+
explicit OwningMemoryBlock(MemoryBlock M) : M(std::move(M)) {}
141141
OwningMemoryBlock(OwningMemoryBlock &&Other) {
142142
M = Other.M;
143143
Other.M = MemoryBlock();

0 commit comments

Comments
 (0)