Skip to content

Commit

Permalink
[clang] MangledSymbol: remove pointless copy of vector (#90012)
Browse files Browse the repository at this point in the history
This pr addresses #87255 adds a std::move call to the names in
MangledSymbol's constructor.
  • Loading branch information
sookach committed May 7, 2024
1 parent 6a6fcbf commit e84fae8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>;

Expand Down

0 comments on commit e84fae8

Please sign in to comment.