[llvm] [DebugInfo] Use std::move (NFC) (PR #136263)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 17 23:11:48 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-debuginfo
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/136263.diff
1 Files Affected:
- (modified) llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h (+3-1)
``````````diff
diff --git a/llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h b/llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h
index a8bf33f9ad6b2..566216572bcc2 100644
--- a/llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h
+++ b/llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h
@@ -41,7 +41,9 @@ namespace logicalview {
// Generate get and set 'std::string' functions.
#define STD_STRING_FUNCTION(FAMILY, FIELD) \
std::string get##FAMILY##FIELD() const { return FAMILY.FIELD; } \
- void set##FAMILY##FIELD(std::string FIELD) { FAMILY.FIELD = FIELD; } \
+ void set##FAMILY##FIELD(std::string FIELD) { \
+ FAMILY.FIELD = std::move(FIELD); \
+ } \
void reset##FAMILY##FIELD() { FAMILY.FIELD = ""; }
// Generate get and set 'std::set' functions.
``````````
</details>
https://github.com/llvm/llvm-project/pull/136263
More information about the llvm-commits
mailing list