diff options
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp index 0d7fd321ed0..e2811e895e8 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp @@ -801,8 +801,8 @@ uint32_t SymbolFileDWARFDebugMap::PrivateFindGlobalVariables( if (comp_unit_info) { SymbolFileDWARF *oso_dwarf = GetSymbolFileByOSOIndex(oso_idx); if (oso_dwarf) { - if (oso_dwarf->FindGlobalVariables(name, parent_decl_ctx, true, - max_matches, variables)) + if (oso_dwarf->FindGlobalVariables(name, parent_decl_ctx, max_matches, + variables)) if (variables.GetSize() > max_matches) break; } @@ -813,21 +813,16 @@ uint32_t SymbolFileDWARFDebugMap::PrivateFindGlobalVariables( uint32_t SymbolFileDWARFDebugMap::FindGlobalVariables( const ConstString &name, const CompilerDeclContext *parent_decl_ctx, - bool append, uint32_t max_matches, VariableList &variables) { + uint32_t max_matches, VariableList &variables) { - // If we aren't appending the results to this list, then clear the list - if (!append) - variables.Clear(); - - // Remember how many variables are in the list before we search in case we - // are appending the results to a variable list. + // Remember how many variables are in the list before we search. const uint32_t original_size = variables.GetSize(); uint32_t total_matches = 0; ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool { const uint32_t oso_matches = oso_dwarf->FindGlobalVariables( - name, parent_decl_ctx, true, max_matches, variables); + name, parent_decl_ctx, max_matches, variables); if (oso_matches > 0) { total_matches += oso_matches; @@ -853,20 +848,15 @@ uint32_t SymbolFileDWARFDebugMap::FindGlobalVariables( uint32_t SymbolFileDWARFDebugMap::FindGlobalVariables(const RegularExpression ®ex, - bool append, uint32_t max_matches, + uint32_t max_matches, VariableList &variables) { - // If we aren't appending the results to this list, then clear the list - if (!append) - variables.Clear(); - - // Remember how many variables are in the list before we search in case we - // are appending the results to a variable list. + // Remember how many variables are in the list before we search. const uint32_t original_size = variables.GetSize(); uint32_t total_matches = 0; ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool { const uint32_t oso_matches = - oso_dwarf->FindGlobalVariables(regex, true, max_matches, variables); + oso_dwarf->FindGlobalVariables(regex, max_matches, variables); if (oso_matches > 0) { total_matches += oso_matches; |