aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-11-17 11:55:38 -0700
committerTom Tromey <tom@tromey.com>2017-11-17 14:34:14 -0700
commit68e745e38edebd2a12d60ef7b5774066db3f1c40 (patch)
treeb3ac1b1b134242ed775ec16b2d16272412c7e295 /gdb/symtab.h
parent71a3c36949407eafea744bf00334c4e0c136f927 (diff)
downloadfsf-binutils-gdb-68e745e38edebd2a12d60ef7b5774066db3f1c40.zip
fsf-binutils-gdb-68e745e38edebd2a12d60ef7b5774066db3f1c40.tar.gz
fsf-binutils-gdb-68e745e38edebd2a12d60ef7b5774066db3f1c40.tar.bz2
Make template_symbol derive from symbol
This changes template_symbol to derive from symbol, which seems a bit cleaner; and also more consistent with rust_vtable_symbol. 2017-11-17 Tom Tromey <tom@tromey.com> * dwarf2read.c (read_func_scope): Update. * symtab.h (struct template_symbol): Derive from symbol. <base>: Remove.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 9466f29..83d0ff2 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1167,16 +1167,11 @@ extern struct symtab *symbol_symtab (const struct symbol *symbol);
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;