diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2022-10-20 13:05:19 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2023-01-05 14:38:51 -0500 |
commit | 1a8605a8c79b0c4ebc71f5691e36a1338d407837 (patch) | |
tree | ecef4a6328ed0a9185e6424bbd7182d092840b17 /gdb | |
parent | 72127b193c970a61a36c940bf167c596ddc32eae (diff) | |
download | gdb-1a8605a8c79b0c4ebc71f5691e36a1338d407837.zip gdb-1a8605a8c79b0c4ebc71f5691e36a1338d407837.tar.gz gdb-1a8605a8c79b0c4ebc71f5691e36a1338d407837.tar.bz2 |
gdbsupport: add gdb::string_view_hash
Add the string_view_hash type, which will be useful to be able to use
gdb::string_view as std::unordered_map keys.
Use it in gdb/symtab.c, to exercise it.
Change-Id: Id69a466ab19a9f6620b5df8a2dd29b5cddd94c00
Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/symtab.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index f2b1a14..b344513 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -812,7 +812,7 @@ hash_demangled_name_entry (const void *data) const struct demangled_name_entry *e = (const struct demangled_name_entry *) data; - return fast_hash (e->mangled.data (), e->mangled.length ()); + return gdb::string_view_hash () (e->mangled); } /* Equality function for the demangled name hash. */ |