]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Change dw2_search_one to be static
authorTom Tromey <tom@tromey.com>
Fri, 21 Nov 2025 16:31:48 +0000 (09:31 -0700)
committerTom Tromey <tom@tromey.com>
Sat, 22 Nov 2025 17:45:45 +0000 (10:45 -0700)
I noticed that dw2_search_one can be static.  Tested by rebuilding.

gdb/dwarf2/read.c
gdb/dwarf2/read.h

index 0e8dc5dd46c0af201a85dad6b370d42e24fed027..b34c346377467a1838582ffa8828c65e40ce1c5c 100644 (file)
@@ -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,
index 992d60528cd04bc04e30750bfa1199e9865390ed..5d8660e9c42d377497c36250c50cb83651bedd0d 100644 (file)
@@ -1257,17 +1257,6 @@ private:
   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