Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 10 additions & 18 deletions lldb/source/Symbol/Symtab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,15 +722,11 @@ Symtab::AppendSymbolIndexesWithNameAndType(ConstString symbol_name,
std::vector<uint32_t> &indexes) {
std::lock_guard<std::recursive_mutex> guard(m_mutex);

if (AppendSymbolIndexesWithName(symbol_name, indexes) > 0) {
std::vector<uint32_t>::iterator pos = indexes.begin();
while (pos != indexes.end()) {
if (symbol_type == eSymbolTypeAny ||
m_symbols[*pos].GetType() == symbol_type)
++pos;
else
pos = indexes.erase(pos);
}
if (AppendSymbolIndexesWithName(symbol_name, indexes) > 0 &&
symbol_type != eSymbolTypeAny) {
llvm::erase_if(indexes, [this, symbol_type](uint32_t index) {
return m_symbols[index].GetType() != symbol_type;
});
}
return indexes.size();
}
Expand All @@ -742,15 +738,11 @@ uint32_t Symtab::AppendSymbolIndexesWithNameAndType(
std::lock_guard<std::recursive_mutex> guard(m_mutex);

if (AppendSymbolIndexesWithName(symbol_name, symbol_debug_type,
symbol_visibility, indexes) > 0) {
std::vector<uint32_t>::iterator pos = indexes.begin();
while (pos != indexes.end()) {
if (symbol_type == eSymbolTypeAny ||
m_symbols[*pos].GetType() == symbol_type)
++pos;
else
pos = indexes.erase(pos);
}
symbol_visibility, indexes) > 0 &&
symbol_type != eSymbolTypeAny) {
llvm::erase_if(indexes, [this, symbol_type](uint32_t index) {
return m_symbols[index].GetType() != symbol_type;
});
}
return indexes.size();
}
Expand Down
Loading