From 1ac14a04025b105c1975ceb3b07245c811518bcb Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Fri, 31 Jul 2020 15:56:15 +0100 Subject: 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. --- gdb/symtab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/symtab.c') diff --git a/gdb/symtab.c b/gdb/symtab.c index 61f96b2..04891c4 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -5768,7 +5768,7 @@ default_collect_symbol_completion_matches_break_on /* Skip macros if we are completing a struct tag -- arguable but usually what is expected. */ - if (current_language->la_macro_expansion == macro_expansion_c + if (current_language->macro_expansion () == macro_expansion_c && code == TYPE_CODE_UNDEF) { gdb::unique_xmalloc_ptr scope; -- cgit v1.1