]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: remove discard_psymtab function
authorSimon Marchi <simon.marchi@polymtl.ca>
Sun, 29 Mar 2020 19:23:31 +0000 (15:23 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sun, 29 Mar 2020 19:23:32 +0000 (15:23 -0400)
This function does not add much value, compared to calling the method on
the psymtab_storage object directly.

gdb/ChangeLog:

* psympriv.h (discard_psymtab): Remove.
* dbxread.c (dbx_end_psymtab): Update.
* xcoffread.c (xcoff_end_psymtab): Update.

gdb/ChangeLog
gdb/dbxread.c
gdb/psympriv.h
gdb/xcoffread.c

index 82ece136367d442c771a3783ea4c6f7c3cd40a50..9e5c1cb3ae00bcf9458f9bcce9ffb0a8c4c3d19b 100644 (file)
@@ -1,3 +1,9 @@
+2020-03-29  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * psympriv.h (discard_psymtab): Remove.
+       * dbxread.c (dbx_end_psymtab): Update.
+       * xcoffread.c (xcoff_end_psymtab): Update.
+
 2020-03-28  Tom Tromey  <tom@tromey.com>
 
        * dwarf2/attribute.h (struct attribute) <form_is_constant>: Update
index 99f47c0c9177caa728b4280faa429fe0a3189470..ecc416e0b5d76078c2f683532c703ac4607a5be2 100644 (file)
@@ -2057,7 +2057,7 @@ dbx_end_psymtab (struct objfile *objfile, legacy_psymtab *pst,
          is not empty, but we don't realize that.  Fixing that without slowing
          things down might be tricky.  */
 
-      discard_psymtab (objfile, pst);
+      objfile->partial_symtabs->discard_psymtab (pst);
 
       /* Indicate that psymtab was thrown away.  */
       pst = NULL;
index 0effedc4ec2ae608d457b2ce12b2c5484182fb18..79f83a4d6cf9143ce787d9335a2aac1a5941fbe4 100644 (file)
@@ -422,12 +422,6 @@ extern void init_psymbol_list (struct objfile *objfile, int total_symbols);
 
 extern void end_psymtab_common (struct objfile *, struct partial_symtab *);
 
-static inline void
-discard_psymtab (struct objfile *objfile, struct partial_symtab *pst)
-{
-  objfile->partial_symtabs->discard_psymtab (pst);
-}
-
 /* Used when recording partial symbol tables.  On destruction,
    discards any partial symbol tables that have been built.  However,
    the tables can be kept by calling the "keep" method.  */
index 735f8b088258ba78fce61ce4d53c28c5d618e04f..dca4c46fb11967670f0c7adc4ac1ef386d251dea 100644 (file)
@@ -2050,7 +2050,7 @@ xcoff_end_psymtab (struct objfile *objfile, legacy_psymtab *pst,
       /* Empty psymtabs happen as a result of header files which don't have
          any symbols in them.  There can be a lot of them.  */
 
-      discard_psymtab (objfile, pst);
+      objfile->partial_symtabs->discard_psymtab (pst);
 
       /* Indicate that psymtab was thrown away.  */
       pst = NULL;