+2017-11-09 Tom Tromey <tom@tromey.com>
+
+ * psymtab.c (psymbol_hash): Do not hash string contents.
+ (psymbol_compare): Add comment.
+
2017-11-09 Tom Tromey <tom@tromey.com>
* dictionary.c (dict_hash): Move "TKB" check into the "switch".
h = hash_continue (&lang, sizeof (unsigned int), h);
h = hash_continue (&domain, sizeof (unsigned int), h);
h = hash_continue (&theclass, sizeof (unsigned int), h);
- h = hash_continue (psymbol->ginfo.name, strlen (psymbol->ginfo.name), h);
+ /* Note that psymbol names are interned via symbol_set_names, so
+ there's no need to hash the contents of the name here. */
+ h = hash_continue (&psymbol->ginfo.name, sizeof (psymbol->ginfo.name), h);
return h;
}
&& sym1->ginfo.language == sym2->ginfo.language
&& PSYMBOL_DOMAIN (sym1) == PSYMBOL_DOMAIN (sym2)
&& PSYMBOL_CLASS (sym1) == PSYMBOL_CLASS (sym2)
+ /* Note that psymbol names are interned via
+ symbol_set_names, so there's no need to compare the
+ contents of the name here. */
&& sym1->ginfo.name == sym2->ginfo.name);
}