https://github.com/soukatch created 
https://github.com/llvm/llvm-project/pull/90012

This pr addresses #87255 adds a std::move call to the names in MangledSymbol's 
constructor.

>From b8e20a5a3e37ab9a657ac640b848f638387215fa Mon Sep 17 00:00:00 2001
From: Andrew Sukach <andrewsuk...@gmail.com>
Date: Wed, 24 Apr 2024 22:50:50 -0400
Subject: [PATCH] [clang] MangledSymbol: remove pointless copy of vector

---
 clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp 
b/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
index d58f5bb0919906..81a827dba26b90 100644
--- a/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
+++ b/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
@@ -33,7 +33,8 @@ class InterfaceStubFunctionsConsumer : public ASTConsumer {
 
     MangledSymbol(const std::string &ParentName, uint8_t Type, uint8_t Binding,
                   std::vector<std::string> Names)
-        : ParentName(ParentName), Type(Type), Binding(Binding), Names(Names) {}
+        : ParentName(ParentName), Type(Type), Binding(Binding),
+          Names(std::move(Names)) {}
   };
   using MangledSymbols = std::map<const NamedDecl *, MangledSymbol>;
 

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to