Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

kazutakahirata
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Apr 18, 2025

@llvm/pr-subscribers-debuginfo

Author: Kazu Hirata (kazutakahirata)

Changes

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 --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.

@kazutakahirata kazutakahirata merged commit 2a692d2 into llvm:main Apr 18, 2025
13 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_001_std_move_llvm_DebugInfo branch April 18, 2025 17:05
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants