]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Change create_demangled_names_hash to take an objfile_per_bfd_storage
authorTom Tromey <tom@tromey.com>
Thu, 10 May 2018 22:23:48 +0000 (16:23 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 10 Jan 2019 14:08:12 +0000 (07:08 -0700)
This changes create_demangled_names_hash to take an
objfile_per_bfd_storage parameter.  This makes it clearer where it is
storing the objects it allocates.

gdb/ChangeLog
2019-01-10  Tom Tromey  <tom@tromey.com>

* symtab.c (create_demangled_names_hash): Change argument to be an
objfile_per_bfd_storage.
(symbol_set_names): Update.

gdb/ChangeLog
gdb/symtab.c

index e0cf7cbfe2449343df196a67e39e4f22b8bc65a4..25a219f64d752c00d5fd56cef5a82b756db9fea3 100644 (file)
@@ -1,3 +1,9 @@
+2019-01-10  Tom Tromey  <tom@tromey.com>
+
+       * symtab.c (create_demangled_names_hash): Change argument to be an
+       objfile_per_bfd_storage.
+       (symbol_set_names): Update.
+
 2019-01-10  Tom Tromey  <tom@tromey.com>
 
        * xcoffread.c (xcoff_initial_scan): Unconditionally call
index c4343cd533bc7850339bd28ac8a5f8942df74287..3f15dbdf2516d133904577b3a95d682ded663030 100644 (file)
@@ -707,14 +707,14 @@ eq_demangled_name_entry (const void *a, const void *b)
    name.  The entry is hashed via just the mangled name.  */
 
 static void
-create_demangled_names_hash (struct objfile *objfile)
+create_demangled_names_hash (struct objfile_per_bfd_storage *per_bfd)
 {
   /* Choose 256 as the starting size of the hash table, somewhat arbitrarily.
      The hash table code will round this up to the next prime number.
      Choosing a much larger table size wastes memory, and saves only about
      1% in symbol reading.  */
 
-  objfile->per_bfd->demangled_names_hash = htab_create_alloc
+  per_bfd->demangled_names_hash = htab_create_alloc
     (256, hash_demangled_name_entry, eq_demangled_name_entry,
      NULL, xcalloc, xfree);
 }
@@ -801,7 +801,7 @@ symbol_set_names (struct general_symbol_info *gsymbol,
     }
 
   if (per_bfd->demangled_names_hash == NULL)
-    create_demangled_names_hash (objfile);
+    create_demangled_names_hash (per_bfd);
 
   if (linkage_name[len] != '\0')
     {