gdb: Convert language_data::la_macro_expansion to a method
Convert language_data::la_macro_expansion member variable to a virtual method language_defn::macro_expansion. There should be no user visible changes after this commit. gdb/ChangeLog: * ada-lang.c (ada_language_data): Remove la_macro_expansion initializer. * c-lang.c (c_language_data): Likewise. (c_language::macro_expansion): New member function. (cplus_language_data): Likewise. (cplus_language::macro_expansion): New member function. (asm_language_data): Likewise. (asm_language::macro_expansion): New member function. (minimal_language_data): Likewise. (minimal_language::macro_expansion): New member function. * d-lang.c (d_language_data): Remove la_macro_expansion initializer. * 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 (language_data): Remove la_macro_expansion field. (language_defn::macro_expansion): New member function. * m2-lang.c (m2_language_data): Remove la_macro_expansion initializer. * objc-lang.c (objc_language_data): Likewise. (objc_language::macro_expansion): New member function. * opencl-lang.c (opencl_language_data): Likewise. (opencl_language::macro_expansion): New member function. * p-lang.c (pascal_language_data): Remove la_macro_expansion initializer. * rust-lang.c (rust_language_data): Likewise. * symtab.c (default_collect_symbol_completion_matches_break_on): Update call to macro_expansion.
This commit is contained in:
parent
3a3440fb8b
commit
1ac14a0402
14 changed files with 69 additions and 19 deletions
24
gdb/c-lang.c
24
gdb/c-lang.c
|
@ -875,7 +875,6 @@ const struct exp_descriptor exp_descriptor_c =
|
|||
|
||||
extern const struct language_data c_language_data =
|
||||
{
|
||||
macro_expansion_c,
|
||||
&exp_descriptor_c,
|
||||
c_op_print_tab, /* expression operators for printing */
|
||||
&c_varobj_ops,
|
||||
|
@ -944,6 +943,11 @@ public:
|
|||
|
||||
bool store_sym_names_in_linkage_form_p () const override
|
||||
{ return true; }
|
||||
|
||||
/* See language.h. */
|
||||
|
||||
enum macro_expansion macro_expansion () const override
|
||||
{ return macro_expansion_c; }
|
||||
};
|
||||
|
||||
/* Single instance of the C language class. */
|
||||
|
@ -982,7 +986,6 @@ enum cplus_primitive_types {
|
|||
|
||||
extern const struct language_data cplus_language_data =
|
||||
{
|
||||
macro_expansion_c,
|
||||
&exp_descriptor_c,
|
||||
c_op_print_tab, /* expression operators for printing */
|
||||
&cplus_varobj_ops,
|
||||
|
@ -1168,6 +1171,11 @@ public:
|
|||
const char *name_of_this () const override
|
||||
{ return "this"; }
|
||||
|
||||
/* See language.h. */
|
||||
|
||||
enum macro_expansion macro_expansion () const override
|
||||
{ return macro_expansion_c; }
|
||||
|
||||
protected:
|
||||
|
||||
/* See language.h. */
|
||||
|
@ -1187,7 +1195,6 @@ static cplus_language cplus_language_defn;
|
|||
|
||||
extern const struct language_data asm_language_data =
|
||||
{
|
||||
macro_expansion_c,
|
||||
&exp_descriptor_c,
|
||||
c_op_print_tab, /* expression operators for printing */
|
||||
&default_varobj_ops,
|
||||
|
@ -1243,6 +1250,11 @@ public:
|
|||
|
||||
bool store_sym_names_in_linkage_form_p () const override
|
||||
{ return true; }
|
||||
|
||||
/* See language.h. */
|
||||
|
||||
enum macro_expansion macro_expansion () const override
|
||||
{ return macro_expansion_c; }
|
||||
};
|
||||
|
||||
/* The single instance of the ASM language class. */
|
||||
|
@ -1255,7 +1267,6 @@ static asm_language asm_language_defn;
|
|||
|
||||
extern const struct language_data minimal_language_data =
|
||||
{
|
||||
macro_expansion_c,
|
||||
&exp_descriptor_c,
|
||||
c_op_print_tab, /* expression operators for printing */
|
||||
&default_varobj_ops,
|
||||
|
@ -1300,6 +1311,11 @@ public:
|
|||
|
||||
bool store_sym_names_in_linkage_form_p () const override
|
||||
{ return true; }
|
||||
|
||||
/* See language.h. */
|
||||
|
||||
enum macro_expansion macro_expansion () const override
|
||||
{ return macro_expansion_c; }
|
||||
};
|
||||
|
||||
/* The single instance of the minimal language class. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue