aboutsummaryrefslogtreecommitdiffstats
path: root/source/Core/AddressResolverName.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Core/AddressResolverName.cpp')
-rw-r--r--source/Core/AddressResolverName.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/source/Core/AddressResolverName.cpp b/source/Core/AddressResolverName.cpp
index e861368c0a25..6b9b7b2de723 100644
--- a/source/Core/AddressResolverName.cpp
+++ b/source/Core/AddressResolverName.cpp
@@ -36,7 +36,8 @@ AddressResolverName::AddressResolverName(const char *func_name,
: AddressResolver(), m_func_name(func_name), m_class_name(nullptr),
m_regex(), m_match_type(type) {
if (m_match_type == AddressResolver::Regexp) {
- if (!m_regex.Compile(m_func_name.GetStringRef())) {
+ m_regex = RegularExpression(m_func_name.GetStringRef());
+ if (!m_regex.IsValid()) {
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
if (log)
@@ -46,9 +47,9 @@ AddressResolverName::AddressResolverName(const char *func_name,
}
}
-AddressResolverName::AddressResolverName(RegularExpression &func_regex)
+AddressResolverName::AddressResolverName(RegularExpression func_regex)
: AddressResolver(), m_func_name(nullptr), m_class_name(nullptr),
- m_regex(func_regex), m_match_type(AddressResolver::Regexp) {}
+ m_regex(std::move(func_regex)), m_match_type(AddressResolver::Regexp) {}
AddressResolverName::AddressResolverName(const char *class_name,
const char *method,
@@ -66,8 +67,7 @@ AddressResolverName::~AddressResolverName() = default;
Searcher::CallbackReturn
AddressResolverName::SearchCallback(SearchFilter &filter,
- SymbolContext &context, Address *addr,
- bool containing) {
+ SymbolContext &context, Address *addr) {
SymbolContextList func_list;
SymbolContextList sym_list;
@@ -86,7 +86,6 @@ AddressResolverName::SearchCallback(SearchFilter &filter,
const bool include_symbols = false;
const bool include_inlines = true;
- const bool append = false;
switch (m_match_type) {
case AddressResolver::Exact:
if (context.module_sp) {
@@ -94,7 +93,7 @@ AddressResolverName::SearchCallback(SearchFilter &filter,
eSymbolTypeCode, sym_list);
context.module_sp->FindFunctions(m_func_name, nullptr,
eFunctionNameTypeAuto, include_symbols,
- include_inlines, append, func_list);
+ include_inlines, func_list);
}
break;
@@ -103,7 +102,7 @@ AddressResolverName::SearchCallback(SearchFilter &filter,
context.module_sp->FindSymbolsMatchingRegExAndType(
m_regex, eSymbolTypeCode, sym_list);
context.module_sp->FindFunctions(m_regex, include_symbols,
- include_inlines, append, func_list);
+ include_inlines, func_list);
}
break;