From 54f4ca4610893424746e56997115b71bc31ffd8a Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Fri, 1 May 2020 22:12:12 +0100 Subject: gdb: Convert language la_lookup_transparent_type field to a method This commit changes the language_data::la_lookup_transparent_type 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_lookup_transparent_type initializer. * c-lang.c (c_language_data): Likewise. (cplus_language_data): Likewise. (cplus_language::lookup_transparent_type): New member function. (asm_language_data): Delete la_lookup_transparent_type initializer. (minimal_language_data): Likewise. * d-lang.c (d_language_data): Likewise. * f-lang.c (f_language_data): Likewise. * go-lang.c (go_language_data): Likewise. * language.c (unknown_language_data): Likewise. (auto_language_data): Likewise. * language.h (struct language_data): Delete la_lookup_transparent_type field. (language_defn::lookup_transparent_type): New member function. * m2-lang.c (m2_language_data): Delete la_lookup_transparent_type 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 (symbol_matches_domain): Update call. --- gdb/language.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gdb/language.h') diff --git a/gdb/language.h b/gdb/language.h index 4cf16c1..505600a 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -315,9 +315,6 @@ struct language_data const struct block *, const domain_enum); - /* Find the definition of the type with the given name. */ - struct type *(*la_lookup_transparent_type) (const char *); - /* Return demangled language symbol, or NULL. */ char *(*la_demangle) (const char *mangled, int options); @@ -504,6 +501,13 @@ struct language_defn : language_data virtual void language_arch_info (struct gdbarch *, struct language_arch_info *) const = 0; + /* Find the definition of the type with the given name. */ + + virtual struct type *lookup_transparent_type (const char *name) const + { + return basic_lookup_transparent_type (name); + } + /* List of all known languages. */ static const struct language_defn *languages[nr_languages]; }; -- cgit v1.1