diff options
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index 47da5cf4e8c..40cc34b2059 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -808,7 +808,7 @@ symbol_find_demangled_name (struct general_symbol_info *gsymbol, void symbol_set_names (struct general_symbol_info *gsymbol, const char *linkage_name, int len, bool copy_name, - struct objfile_per_bfd_storage *per_bfd) + struct objfile_per_bfd_storage *per_bfd, hashval_t hash) { struct demangled_name_entry **slot; /* A 0-terminated copy of the linkage name. */ @@ -854,9 +854,11 @@ symbol_set_names (struct general_symbol_info *gsymbol, create_demangled_names_hash (per_bfd); entry.mangled = linkage_name_copy; + if (hash == 0) + hash = hash_demangled_name_entry (&entry); slot = ((struct demangled_name_entry **) - htab_find_slot (per_bfd->demangled_names_hash.get (), - &entry, INSERT)); + htab_find_slot_with_hash (per_bfd->demangled_names_hash.get (), + &entry, hash, INSERT)); /* If this name is not in the hash table, add it. */ if (*slot == NULL |