[lldb][NFCI] BreakpointResolverName ctor shouldn't unnecessarily copy data (#66001)

Instead of creating a copy of the vector, we should just pass a
reference along. The only method that calls this Ctor also holds onto a
non-mutable reference to the vector of strings so a copy should be
unnecessary.
This commit is contained in:
Alex
2023-09-12 15:32:06 -07:00
committed by GitHub
parent 859e6aa100
commit 64122580c0
2 changed files with 5 additions and 7 deletions

View File

@@ -56,12 +56,10 @@ BreakpointResolverName::BreakpointResolverName(
}
}
BreakpointResolverName::BreakpointResolverName(const BreakpointSP &bkpt,
std::vector<std::string> names,
FunctionNameType name_type_mask,
LanguageType language,
lldb::addr_t offset,
bool skip_prologue)
BreakpointResolverName::BreakpointResolverName(
const BreakpointSP &bkpt, const std::vector<std::string> &names,
FunctionNameType name_type_mask, LanguageType language, lldb::addr_t offset,
bool skip_prologue)
: BreakpointResolver(bkpt, BreakpointResolver::NameResolver, offset),
m_match_type(Breakpoint::Exact), m_language(language),
m_skip_prologue(skip_prologue) {