summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-05-31 09:46:26 +0000
committerPavel Labath <labath@google.com>2018-05-31 09:46:26 +0000
commit34cda14b09e0e55f59ce374265207d9af04d27be (patch)
tree8048944a9b23fa6a48ccfd966b08b2cd467c0bca /lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
parentaf3226752b4de38df6b486f5e8949152d1c1daed (diff)
downloadbcm5719-llvm-34cda14b09e0e55f59ce374265207d9af04d27be.tar.gz
bcm5719-llvm-34cda14b09e0e55f59ce374265207d9af04d27be.zip
Remove append parameter to FindGlobalVariables
Summary: As discussed in https://bugs.llvm.org/show_bug.cgi?id=37317, FindGlobalVariables does not properly handle the case where append=false. As this doesn't seem to be used in the tree, this patch removes the parameter entirely. Reviewers: clayborg, jingham, labath Reviewed By: clayborg Subscribers: aprantl, lldb-commits, kubamracek, JDevlieghere Differential Revision: https://reviews.llvm.org/D46885 Patch by Tom Tromey <ttromey@mozilla.com>. llvm-svn: 333639
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp26
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 &regex,
- 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;
OpenPOWER on IntegriCloud