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.