diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-05-02 10:24:05 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-06-02 13:53:10 +0100 |
commit | fb8006fd350ad9eba04c19904f9a0fcd47628b41 (patch) | |
tree | 85f3e05352415e4fbf978913ff090fa5e9567d2a /gdb/c-lang.c | |
parent | 8e25bafe932b090850854321b816685b2462c17e (diff) | |
download | binutils-fb8006fd350ad9eba04c19904f9a0fcd47628b41.zip binutils-fb8006fd350ad9eba04c19904f9a0fcd47628b41.tar.gz binutils-fb8006fd350ad9eba04c19904f9a0fcd47628b41.tar.bz2 |
gdb: Convert language la_search_name_hash field to a method
This commit changes the language_data::la_search_name_hash
function pointer member variable into a member function of
language_defn.
There should be no user visible changes after this commit.
gdb/ChangeLog:
* ada-lang.c (ada_language_data): Delete la_search_name_hash
initializer.
* c-lang.c (c_language_data): Likewise.
(cplus_language_data): Likewise.
(cplus_language::search_name_hash): New member function.
(asm_language_data): Delete la_search_name_hash initializer.
(minimal_language_data): Likewise.
* d-lang.c (d_language_data): Likewise.
* dictionary.c (default_search_name_hash): Rename to...
(language_defn::search_name_hash): ...this.
* f-lang.c (f_language_data): Likewise.
(f_language::search_name_hash): New member function.
* go-lang.c (go_language_data): Delete la_search_name_hash
initializer.
* language.c (unknown_language_data): Likewise.
(auto_language_data): Likewise.
* language.h (struct language_data): Delete la_search_name_hash
field.
(language_defn::search_name_hash): Declare new member function.
(default_search_name_hash): Delete declaration.
* m2-lang.c (m2_language_data): Delete la_search_name_hash
initializer.
* objc-lang.c (objc_language_data): Likewise.
* opencl-lang.c (opencl_language_data): Likewise.
* p-lang.c (pascal_language_data): Likewise.
* rust-lang.c (rust_language_data): Likewise.
* symtab.c (search_name_hash): Update call.
Diffstat (limited to 'gdb/c-lang.c')
-rw-r--r-- | gdb/c-lang.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/c-lang.c b/gdb/c-lang.c index eb9ebdb..8452760 100644 --- a/gdb/c-lang.c +++ b/gdb/c-lang.c @@ -924,7 +924,6 @@ extern const struct language_data c_language_data = default_collect_symbol_completion_matches, c_watch_location_expression, NULL, /* la_get_symbol_name_matcher */ - default_search_name_hash, &c_varobj_ops, c_compute_program, c_is_string_type_p, @@ -1028,7 +1027,6 @@ extern const struct language_data cplus_language_data = default_collect_symbol_completion_matches, c_watch_location_expression, cp_get_symbol_name_matcher, - cp_search_name_hash, &cplus_varobj_ops, cplus_compute_program, c_is_string_type_p, @@ -1126,6 +1124,12 @@ public: { return cplus_get_compile_context (); } + + /* See language.h. */ + unsigned int search_name_hash (const char *name) const override + { + return cp_search_name_hash (name); + } }; /* The single instance of the C++ language class. */ @@ -1174,7 +1178,6 @@ extern const struct language_data asm_language_data = default_collect_symbol_completion_matches, c_watch_location_expression, NULL, /* la_get_symbol_name_matcher */ - default_search_name_hash, &default_varobj_ops, NULL, c_is_string_type_p, @@ -1243,7 +1246,6 @@ extern const struct language_data minimal_language_data = default_collect_symbol_completion_matches, c_watch_location_expression, NULL, /* la_get_symbol_name_matcher */ - default_search_name_hash, &default_varobj_ops, NULL, c_is_string_type_p, |