From fbd19c2ae02520a295d2d7d783945c10794e9876 Mon Sep 17 00:00:00 2001 From: Abhishek Kaushik Date: Tue, 11 Feb 2025 14:33:51 +0530 Subject: [PATCH] [MC] Use std::move to avoid copy --- llvm/include/llvm/MC/MCELFStreamer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/include/llvm/MC/MCELFStreamer.h b/llvm/include/llvm/MC/MCELFStreamer.h index 9c86b4ecc6599..8065d17546d2e 100644 --- a/llvm/include/llvm/MC/MCELFStreamer.h +++ b/llvm/include/llvm/MC/MCELFStreamer.h @@ -105,7 +105,7 @@ class MCELFStreamer : public MCObjectStreamer { unsigned IntValue; std::string StringValue; AttributeItem(Types Ty, unsigned Tg, unsigned IV, std::string SV) - : Type(Ty), Tag(Tg), IntValue(IV), StringValue(SV) {} + : Type(Ty), Tag(Tg), IntValue(IV), StringValue(std::move(SV)) {} }; /// ELF object attributes subsection support