+2017-11-17 Tom Tromey <tom@tromey.com>
+
+ * dwarf2read.c (read_func_scope): Update.
+ * symtab.h (struct template_symbol): Derive from symbol.
+ <base>: Remove.
+
2017-11-17 Tom Tromey <tom@tromey.com>
* symtab.h (struct symbol) <is_rust_vtable>: New member.
|| child_die->tag == DW_TAG_template_value_param)
{
templ_func = allocate_template_symbol (objfile);
- templ_func->base.is_cplus_template_function = 1;
+ templ_func->is_cplus_template_function = 1;
break;
}
}
struct template_symbol *result;
result = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct template_symbol);
- initialize_objfile_symbol_1 (&result->base);
+ initialize_objfile_symbol_1 (result);
return result;
}
extern void symbol_set_symtab (struct symbol *symbol, struct symtab *symtab);
/* An instance of this type is used to represent a C++ template
- function. It includes a "struct symbol" as a kind of base class;
- users downcast to "struct template_symbol *" when needed. A symbol
- is really of this type iff SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION is
- true. */
+ function. A symbol is really of this type iff
+ SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION is true. */
-struct template_symbol
+struct template_symbol : public symbol
{
- /* The base class. */
- struct symbol base;
-
/* The number of template arguments. */
int n_template_arguments;