aboutsummaryrefslogtreecommitdiff
path: root/gdb/language.h
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-05-14 18:41:39 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-06-02 13:53:11 +0100
commitfbfb0a463fc7de88a2da8858ac5cd6c2f4796514 (patch)
tree9a451ad9b5d2edfe0cb960839ba1cee9c015dcf2 /gdb/language.h
parent6f8270197a2909607f2c076018e30677bbac652e (diff)
downloadgdb-fbfb0a463fc7de88a2da8858ac5cd6c2f4796514.zip
gdb-fbfb0a463fc7de88a2da8858ac5cd6c2f4796514.tar.gz
gdb-fbfb0a463fc7de88a2da8858ac5cd6c2f4796514.tar.bz2
gdb: Convert language la_print_type field to a method
This commit changes the language_data::la_print_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_print_type initializer. (ada_language::print_type): New member function. * c-lang.c (c_language_data): Delete la_print_type initializer. (c_language::print_type): New member function. (cplus_language_data): Delete la_print_type initializer. (cplus_language::print_type): New member function. (asm_language_data): Delete la_print_type initializer. (asm_language::print_type): New member function. (minimal_language_data): Delete la_print_type initializer. (minimal_language::print_type): New member function. * d-lang.c (d_language_data): Delete la_print_type initializer. (d_language::print_type): New member function. * f-lang.c (f_language_data): Delete la_print_type initializer. (f_language::print_type): New member function. * go-lang.c (go_language_data): Delete la_print_type initializer. (go_language::print_type): New member function. * language.c (unk_lang_print_type): Delete. (unknown_language_data): Delete la_print_type initializer. (unknown_language::print_type): New member function. (auto_language_data): Delete la_print_type initializer. (auto_language::print_type): New member function. * language.h (language_data): Delete la_print_type field. (language_defn::print_type): New function. (LA_PRINT_TYPE): Update. * m2-lang.c (m2_language_data): Delete la_print_type initializer. (m2_language::print_type): New member function. * objc-lang.c (objc_language_data): Delete la_print_type initializer. (objc_language::print_type): New member function. * opencl-lang.c (opencl_print_type): Delete, implementation moved to opencl_language::print_type. (opencl_language_data): Delete la_print_type initializer. (opencl_language::print_type): New member function, implementation from opencl_print_type. * p-lang.c (pascal_language_data): Delete la_print_type initializer. (pascal_language::print_type): New member function. * rust-lang.c (rust_print_type): Delete, implementation moved to rust_language::print_type. (rust_language_data): Delete la_print_type initializer. (rust_language::print_type): New member function, implementation from rust_print_type.
Diffstat (limited to 'gdb/language.h')
-rw-r--r--gdb/language.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/language.h b/gdb/language.h
index d5013bf..8defe95 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -248,11 +248,6 @@ struct language_data
void (*la_emitchar) (int ch, struct type *chtype,
struct ui_file * stream, int quoter);
- /* Print a type using syntax appropriate for this language. */
-
- void (*la_print_type) (struct type *, const char *, struct ui_file *, int,
- int, const struct type_print_options *);
-
/* Print a typedef using syntax appropriate for this language.
TYPE is the underlying type. NEW_SYMBOL is the symbol naming
the type. STREAM is the output stream on which to print. */
@@ -517,6 +512,11 @@ struct language_defn : language_data
return false;
}
+ /* Print a type using syntax appropriate for this language. */
+
+ virtual void print_type (struct type *, const char *, struct ui_file *, int,
+ int, const struct type_print_options *) const = 0;
+
/* List of all known languages. */
static const struct language_defn *languages[nr_languages];
};
@@ -605,7 +605,7 @@ extern enum language set_language (enum language);
with the "set language" command. */
#define LA_PRINT_TYPE(type,varstring,stream,show,level,flags) \
- (current_language->la_print_type(type,varstring,stream,show,level,flags))
+ (current_language->print_type(type,varstring,stream,show,level,flags))
#define LA_PRINT_TYPEDEF(type,new_symbol,stream) \
(current_language->la_print_typedef(type,new_symbol,stream))