[llvm] Use `std::move` to avoid redundant copy (PR #113054)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 19 10:14:49 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-tablegen
Author: None (abhishek-kaushik22)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/113054.diff
1 Files Affected:
- (modified) llvm/utils/TableGen/DecoderEmitter.cpp (+1-1)
``````````diff
diff --git a/llvm/utils/TableGen/DecoderEmitter.cpp b/llvm/utils/TableGen/DecoderEmitter.cpp
index 4d2320b31ea94a..55af5fdc3d6a37 100644
--- a/llvm/utils/TableGen/DecoderEmitter.cpp
+++ b/llvm/utils/TableGen/DecoderEmitter.cpp
@@ -2059,7 +2059,7 @@ populateInstruction(const CodeGenTarget &Target, const Record &EncodingDef,
MyName = Op.Name;
TiedNames[MyName] = TiedName;
- TiedNames[TiedName] = MyName;
+ TiedNames[TiedName] = std::move(MyName);
}
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/113054
More information about the llvm-commits
mailing list