[PATCH v2 27/28] Make dw_expand_symtabs_matching_file_matcher static

Tom Tromey
2025-04-02T23:57:02Z

dw_expand_symtabs_matching_file_matcher is no longer needed outside of
read.c, so it can be made static.
---
gdb/dwarf2/read.c | 11 +++++++++--
gdb/dwarf2/read.h | 9 ---------
2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 6eee9631623435cbb39830116b790ba4b1f0c21d..efd17c27fcc10f078683ebfa9158ebfc2011f6b3 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -843,6 +843,11 @@ static struct dwarf2_section_info *cu_debug_loc_section (struct dwarf2_cu *cu);
static struct dwarf2_section_info *cu_debug_rnglists_section
(struct dwarf2_cu *cu, dwarf_tag tag);

+static void dw_expand_symtabs_matching_file_matcher
+ (dwarf2_per_objfile *per_objfile,
+ auto_bool_vector &marked,
+ expand_symtabs_file_matcher file_matcher);
+
static void get_scope_pc_bounds (struct die_info *,
unrelocated_addr *, unrelocated_addr *,
struct dwarf2_cu *);
@@ -1961,9 +1966,11 @@ dw2_expand_symtabs_matching_one
return true;
}

-/* See read.h. */
+/* If FILE_MATCHER is non-NULL, set all the
+ dwarf2_per_cu_quick_data::MARK of the current DWARF2_PER_OBJFILE
+ that match FILE_MATCHER. */

-void
+static void
dw_expand_symtabs_matching_file_matcher
(dwarf2_per_objfile *per_objfile,
auto_bool_vector &marked,
diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h
index 6cc08993a3ce7cdfa8b80350e8f0b965ed69b3e3..996afa6feeaf42a3a8750a5af5fd2aa5a0622952 100644
--- a/gdb/dwarf2/read.h
+++ b/gdb/dwarf2/read.h
@@ -1215,15 +1215,6 @@ extern bool dw2_expand_symtabs_matching_one
expand_symtabs_expansion_listener expansion_notify,
expand_symtabs_lang_matcher lang_matcher);

-/* If FILE_MATCHER is non-NULL, set all the
- dwarf2_per_cu_quick_data::MARK of the current DWARF2_PER_OBJFILE
- that match FILE_MATCHER. */
-
-extern void dw_expand_symtabs_matching_file_matcher
- (dwarf2_per_objfile *per_objfile,
- auto_bool_vector &marked,
- expand_symtabs_file_matcher file_matcher);
-
/* Return pointer to string at .debug_str offset STR_OFFSET. */

extern const char *read_indirect_string_at_offset

--
2.46.1