From: Tom Tromey Date: Tue, 11 Mar 2025 15:31:22 +0000 (-0600) Subject: Use gdb unordered map in dictionary.c X-Git-Tag: binutils-2_45~1146 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=39e99b6a7f97274ab4cc03cb5962686f30161010;p=thirdparty%2Fbinutils-gdb.git Use gdb unordered map in dictionary.c This changes dictionary.c to use gdb::unordered_map. Approved-By: Simon Marchi --- diff --git a/gdb/dictionary.c b/gdb/dictionary.c index f617b8f967f..f673877338c 100644 --- a/gdb/dictionary.c +++ b/gdb/dictionary.c @@ -26,7 +26,7 @@ #include "buildsym.h" #include "dictionary.h" #include "gdbsupport/gdb-safe-ctype.h" -#include +#include "gdbsupport/unordered_map.h" #include "language.h" /* This file implements dictionaries, which are tables that associate @@ -917,10 +917,10 @@ struct multidictionary /* A helper function to collate symbols on the pending list by language. */ -static std::unordered_map> +static gdb::unordered_map> collate_pending_symbols_by_language (const struct pending *symbol_list) { - std::unordered_map> nsyms; + gdb::unordered_map> nsyms; for (const pending *list_counter = symbol_list; list_counter != nullptr; list_counter = list_counter->next) @@ -943,7 +943,7 @@ mdict_create_hashed (struct obstack *obstack, { struct multidictionary *retval = XOBNEW (obstack, struct multidictionary); - std::unordered_map> nsyms + gdb::unordered_map> nsyms = collate_pending_symbols_by_language (symbol_list); /* Loop over all languages and create/populate dictionaries. */ @@ -988,7 +988,7 @@ mdict_create_linear (struct obstack *obstack, { struct multidictionary *retval = XOBNEW (obstack, struct multidictionary); - std::unordered_map> nsyms + gdb::unordered_map> nsyms = collate_pending_symbols_by_language (symbol_list); /* Loop over all languages and create/populate dictionaries. */ @@ -1132,7 +1132,7 @@ void mdict_add_pending (struct multidictionary *mdict, const struct pending *symbol_list) { - std::unordered_map> nsyms + gdb::unordered_map> nsyms = collate_pending_symbols_by_language (symbol_list); for (const auto &pair : nsyms)