[clang] e84fae8 - [clang] MangledSymbol: remove pointless copy of vector (#90012)
via cfe-commits
cfe-commits at lists.llvm.org
Tue May 7 08:40:30 PDT 2024
Author: Andrew Sukach
Date: 2024-05-07T11:40:26-04:00
New Revision: e84fae837c0b154153bd9b9a3255ec5a67b1ea61
URL: https://github.com/llvm/llvm-project/commit/e84fae837c0b154153bd9b9a3255ec5a67b1ea61
DIFF: https://github.com/llvm/llvm-project/commit/e84fae837c0b154153bd9b9a3255ec5a67b1ea61.diff
LOG: [clang] MangledSymbol: remove pointless copy of vector (#90012)
This pr addresses #87255 adds a std::move call to the names in
MangledSymbol's constructor.
Added:
Modified:
clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
Removed:
################################################################################
diff --git a/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp b/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
index f8dced5dbafb6..d7cfd23bb0a7a 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>;
More information about the cfe-commits
mailing list