projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use an accessor function for general_symbol_info::language
[deliverable/binutils-gdb.git]
/
gdb
/
dictionary.c
diff --git
a/gdb/dictionary.c
b/gdb/dictionary.c
index 939f32b59afb0cf07d3d72dc7669d40115e7a2b3..125a062d80d88c3ec4d82da83314f09b51eb8eff 100644
(file)
--- a/
gdb/dictionary.c
+++ b/
gdb/dictionary.c
@@
-508,16
+508,6
@@
dict_size (const struct dictionary *dict)
implemented generically by means of the vtable. Typically, they're
rarely used. */
implemented generically by means of the vtable. Typically, they're
rarely used. */
-/* Test to see if DICT is empty. */
-
-static int
-dict_empty (struct dictionary *dict)
-{
- struct dict_iterator iter;
-
- return (dict_iterator_first (dict, &iter) == NULL);
-}
-
/* The functions implementing the dictionary interface. */
/* The functions implementing the dictionary interface. */
@@
-650,9
+640,9
@@
insert_symbol_hashed (struct dictionary *dict,
/* We don't want to insert a symbol into a dictionary of a different
language. The two may not use the same hashing algorithm. */
/* We don't want to insert a symbol into a dictionary of a different
language. The two may not use the same hashing algorithm. */
- gdb_assert (
SYMBOL_LANGUAGE (sym
) == DICT_LANGUAGE (dict)->la_language);
+ gdb_assert (
sym->language (
) == DICT_LANGUAGE (dict)->la_language);
- hash = search_name_hash (
SYMBOL_LANGUAGE (sym
), sym->search_name ());
+ hash = search_name_hash (
sym->language (
), sym->search_name ());
hash_index = hash % DICT_HASHED_NBUCKETS (dict);
sym->hash_next = buckets[hash_index];
buckets[hash_index] = sym;
hash_index = hash % DICT_HASHED_NBUCKETS (dict);
sym->hash_next = buckets[hash_index];
buckets[hash_index] = sym;
@@
-938,7
+928,7
@@
collate_pending_symbols_by_language (const struct pending *symbol_list)
{
for (int i = list_counter->nsyms - 1; i >= 0; --i)
{
{
for (int i = list_counter->nsyms - 1; i >= 0; --i)
{
- enum language language =
SYMBOL_LANGUAGE (list_counter->symbol[i]
);
+ enum language language =
list_counter->symbol[i]->language (
);
nsyms[language].push_back (list_counter->symbol[i]);
}
}
nsyms[language].push_back (list_counter->symbol[i]);
}
}
@@
-1126,13
+1116,13
@@
void
mdict_add_symbol (struct multidictionary *mdict, struct symbol *sym)
{
struct dictionary *dict
mdict_add_symbol (struct multidictionary *mdict, struct symbol *sym)
{
struct dictionary *dict
- = find_language_dictionary (mdict,
SYMBOL_LANGUAGE (sym
));
+ = find_language_dictionary (mdict,
sym->language (
));
if (dict == nullptr)
{
/* SYM is of a new language that we haven't previously seen.
Create a new dictionary for it. */
if (dict == nullptr)
{
/* SYM is of a new language that we haven't previously seen.
Create a new dictionary for it. */
- dict = create_new_language_dictionary (mdict,
SYMBOL_LANGUAGE (sym
));
+ dict = create_new_language_dictionary (mdict,
sym->language (
));
}
dict_add_symbol (dict, sym);
}
dict_add_symbol (dict, sym);
@@
-1283,17
+1273,3
@@
mdict_size (const struct multidictionary *mdict)
return size;
}
return size;
}
-
-/* See dictionary.h. */
-
-bool
-mdict_empty (const struct multidictionary *mdict)
-{
- for (unsigned short idx = 0; idx < mdict->n_allocated_dictionaries; ++idx)
- {
- if (!dict_empty (mdict->dictionaries[idx]))
- return false;
- }
-
- return true;
-}
This page took
0.02645 seconds
and
4
git commands to generate.