[llvm] [DebugInfo] Use std::move (NFC) (PR #136263)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 17 23:11:13 PDT 2025


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/136263

None

>From 46cb0dcb9f1748f9d3d5a9d0427932710fdc56a1 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Thu, 17 Apr 2025 23:07:09 -0700
Subject: [PATCH] [DebugInfo] Use std::move (NFC)

---
 llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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.



More information about the llvm-commits mailing list