Remove parameter from free_dwo_file
authorTom Tromey <tom@tromey.com>
Wed, 28 Mar 2018 21:21:08 +0000 (15:21 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 30 Mar 2018 19:15:57 +0000 (13:15 -0600)
The objfile parameter to free_dwo_file is unused, so remove it.

gdb/ChangeLog
2018-03-30  Tom Tromey  <tom@tromey.com>

* dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
(free_dwo_file_cleanup, free_dwo_file_from_slot): Update.

gdb/ChangeLog
gdb/dwarf2read.c

index 9b4675f281bd18924be41957c10af68899165969..61f813115c44404f989211b43d932fa06d24c69d 100644 (file)
@@ -1,3 +1,8 @@
+2018-03-30  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
+       (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
+
 2018-03-30  Tom Tromey  <tom@tromey.com>
 
        * dwarf2read.c (class free_cached_comp_units): New class.
index 784049673804c3e671b023b79361aadb361cf4d2..1ab073804da6d024f7214140c377448e2a7a2ff9 100644 (file)
@@ -13513,13 +13513,11 @@ queue_and_load_all_dwo_tus (struct dwarf2_per_cu_data *per_cu)
 }
 
 /* Free all resources associated with DWO_FILE.
-   Close the DWO file and munmap the sections.
-   All memory should be on the objfile obstack.  */
+   Close the DWO file and munmap the sections.  */
 
 static void
-free_dwo_file (struct dwo_file *dwo_file, struct objfile *objfile)
+free_dwo_file (struct dwo_file *dwo_file)
 {
-
   /* Note: dbfd is NULL for virtual DWO files.  */
   gdb_bfd_unref (dwo_file->dbfd);
 
@@ -13533,9 +13531,8 @@ free_dwo_file_cleanup (void *arg)
 {
   struct free_dwo_file_cleanup_data *data
     = (struct free_dwo_file_cleanup_data *) arg;
-  struct objfile *objfile = data->dwarf2_per_objfile->objfile;
 
-  free_dwo_file (data->dwo_file, objfile);
+  free_dwo_file (data->dwo_file);
 
   xfree (data);
 }
@@ -13546,9 +13543,8 @@ static int
 free_dwo_file_from_slot (void **slot, void *info)
 {
   struct dwo_file *dwo_file = (struct dwo_file *) *slot;
-  struct objfile *objfile = (struct objfile *) info;
 
-  free_dwo_file (dwo_file, objfile);
+  free_dwo_file (dwo_file);
 
   return 1;
 }
This page took 0.038809 seconds and 4 git commands to generate.