Change dw2_search_one to be static
I noticed that dw2_search_one can be static. Tested by rebuilding.
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 0e8dc5d..b34c346 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -986,6 +986,13 @@ static void queue_comp_unit (dwarf2_per_cu *per_cu,
static void process_queue (dwarf2_per_objfile *per_objfile);
+static bool dw2_search_one (dwarf2_per_cu *per_cu,
+ dwarf2_per_objfile *per_objfile,
+ auto_bool_vector &cus_to_skip,
+ search_symtabs_file_matcher file_matcher,
+ search_symtabs_expansion_listener listener,
+ search_symtabs_lang_matcher lang_matcher);
+
/* Class, the destructor of which frees all allocated queue entries. This
will only have work to do if an error was thrown while processing the
dwarf. If no error was thrown then the queue entries should have all
@@ -2007,9 +2014,10 @@ dwarf2_base_index_functions::expand_all_symtabs (struct objfile *objfile)
}
}
-/* See read.h. */
+/* If FILE_MATCHER is NULL and if CUS_TO_SKIP does not include the
+ CU's index, expand the CU and call LISTENER on it. */
-bool
+static bool
dw2_search_one
(dwarf2_per_cu *per_cu,
dwarf2_per_objfile *per_objfile,
diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h
index 992d605..5d8660e 100644
--- a/gdb/dwarf2/read.h
+++ b/gdb/dwarf2/read.h
@@ -1257,17 +1257,6 @@ class auto_bool_vector
std::vector<bool> m_vec;
};
-/* If FILE_MATCHER is NULL and if CUS_TO_SKIP does not include the
- CU's index, expand the CU and call LISTENER on it. */
-
-extern bool dw2_search_one
- (dwarf2_per_cu *per_cu,
- dwarf2_per_objfile *per_objfile,
- auto_bool_vector &cus_to_skip,
- search_symtabs_file_matcher file_matcher,
- search_symtabs_expansion_listener listener,
- search_symtabs_lang_matcher lang_matcher);
-
/* Return pointer to string at .debug_str offset STR_OFFSET. */
extern const char *read_indirect_string_at_offset