aboutsummaryrefslogtreecommitdiff
path: root/gdb/linespec.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2001-03-20 16:17:22 +0000
committerJim Blandy <jimb@codesourcery.com>2001-03-20 16:17:22 +0000
commit8bd1f2c64c2a827ad3ebb719bb64a229172e4e8e (patch)
treee47a03146bc4bb14ed1eef080aa1ef2c582814e6 /gdb/linespec.c
parent754cbe1c313b890cbab5a6a8d7ec36a1b27d3ef2 (diff)
downloadgdb-8bd1f2c64c2a827ad3ebb719bb64a229172e4e8e.zip
gdb-8bd1f2c64c2a827ad3ebb719bb64a229172e4e8e.tar.gz
gdb-8bd1f2c64c2a827ad3ebb719bb64a229172e4e8e.tar.bz2
* linespec.c (find_methods): Just call CHECK_TYPEDEF on t, rather
than asking for sym_class's type; that's circuitous. Remove sym_class, since the last use of it is gone.
Diffstat (limited to 'gdb/linespec.c')
-rw-r--r--gdb/linespec.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c
index d70d634..6359bae 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -104,23 +104,19 @@ find_methods (struct type *t, char *name, struct symbol **sym_arr)
{
int i1 = 0;
int ibase;
- struct symbol *sym_class;
char *class_name = type_name_no_tag (t);
/* Ignore this class if it doesn't have a name. This is ugly, but
unless we figure out how to get the physname without the name of
the class, then the loop can't do any good. */
if (class_name
- && (sym_class = lookup_symbol (class_name,
- (struct block *) NULL,
- STRUCT_NAMESPACE,
- (int *) NULL,
- (struct symtab **) NULL)))
+ && (lookup_symbol (class_name, (struct block *) NULL,
+ STRUCT_NAMESPACE, (int *) NULL,
+ (struct symtab **) NULL)))
{
int method_counter;
- /* FIXME: Shouldn't this just be CHECK_TYPEDEF (t)? */
- t = SYMBOL_TYPE (sym_class);
+ CHECK_TYPEDEF (t);
/* Loop over each method name. At this level, all overloads of a name
are counted as a single name. There is an inner loop which loops over
@@ -168,7 +164,7 @@ find_methods (struct type *t, char *name, struct symbol **sym_arr)
}
else
phys_name = TYPE_FN_FIELD_PHYSNAME (f, field_counter);
-
+
/* Destructor is handled by caller, dont add it to the list */
if (DESTRUCTOR_PREFIX_P (phys_name))
continue;