From 2a692d265bbd84dae807d470caed7be507e4118d Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 18 Apr 2025 10:05:18 -0700 Subject: [PATCH] [DebugInfo] Use std::move (NFC) (#136263) --- 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 b60f9e90b4f1..ac0dfba0f1ed 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.