[llvm] 2a692d2 - [DebugInfo] Use std::move (NFC) (#136263)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 18 10:05:22 PDT 2025


Author: Kazu Hirata
Date: 2025-04-18T10:05:18-07:00
New Revision: 2a692d265bbd84dae807d470caed7be507e4118d

URL: https://github.com/llvm/llvm-project/commit/2a692d265bbd84dae807d470caed7be507e4118d
DIFF: https://github.com/llvm/llvm-project/commit/2a692d265bbd84dae807d470caed7be507e4118d.diff

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

Added: 
    

Modified: 
    llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h b/llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h
index b60f9e90b4f1c..ac0dfba0f1ede 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