]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Inline add_symbol_to_list
authorTom Tromey <tom@tromey.com>
Sun, 18 Jan 2026 18:22:45 +0000 (11:22 -0700)
committerTom Tromey <tom@tromey.com>
Tue, 20 Jan 2026 02:44:09 +0000 (19:44 -0700)
add_symbol_to_list is just a simple wrapper for push_back, so we might
as well inline it.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/buildsym.c
gdb/buildsym.h

index d13b17038b2fcd59a7c54c86d4b558e66b751393..3fdb5a6623785c7f0bd6af22249a3ef6f625cbd1 100644 (file)
@@ -91,16 +91,6 @@ buildsym_compunit::get_macro_table ()
   return m_pending_macros;
 }
 
-/* Maintain the lists of symbols and blocks.  */
-
-/* Add a symbol to one of the lists of symbols.  */
-
-void
-add_symbol_to_list (symbol *symbol, std::vector<struct symbol *> &list)
-{
-  list.push_back (symbol);
-}
-
 /* Record BLOCK on the list of all blocks in the file.  Put it after
    OPBLOCK, or at the beginning if opblock is NULL.  This puts the
    block in the list after all its subblocks.  */
index 1adfefa98e4d295788d6af6e31cc91f55b583eb3..fa6fc482866c262f101d1a063b436f6565d29bc8 100644 (file)
@@ -371,7 +371,10 @@ private:
 
 using buildsym_compunit_up = std::unique_ptr<buildsym_compunit>;
 
-extern void add_symbol_to_list (symbol *symbol,
-                               std::vector<struct symbol *> &list);
+static inline
+void add_symbol_to_list (symbol *symbol, std::vector<struct symbol *> &list)
+{
+  list.push_back (symbol);
+}
 
 #endif /* GDB_BUILDSYM_H */