diff options
author | Keith Seitz <keiths@redhat.com> | 2009-06-16 18:39:41 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2009-06-16 18:39:41 +0000 |
commit | 19ef5c713c0116f2e15fea28168614d7894b613a (patch) | |
tree | cf913c08263d2b8aa2a3389dc7f9c2220f70389d /gdb/valops.c | |
parent | a42616899b4f89a1bc1177c8edb27e890af40a82 (diff) | |
download | gdb-19ef5c713c0116f2e15fea28168614d7894b613a.zip gdb-19ef5c713c0116f2e15fea28168614d7894b613a.tar.gz gdb-19ef5c713c0116f2e15fea28168614d7894b613a.tar.bz2 |
* linespec.c (collect_methods): Delete.
(add_matching_methods): Reove destructor special case.
(find_method): Call find_methods directly instead of
collect_methods.
* valops.c (value_struct_elt): Remove destructor
special cases.
(check_field): Likewise.
(value_struct_elt_for_reference): Likewise.
(destructor_name_p): Remove misleading comment about dtors
being "special cases".
* gdbtypes.h (get_destructor_fn_field): Remove. No longer needed.
* gdbtypes.c (get_destructor_fn_field): Likewise.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index 5907d96..5530f55 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -1849,10 +1849,6 @@ value_struct_elt (struct value **argp, struct value **args, /* C++: If it was not found as a data field, then try to return it as a pointer to a method. */ - - if (destructor_name_p (name, t)) - error (_("Cannot get value of destructor")); - v = search_struct_method (name, argp, args, 0, static_memfuncp, t); @@ -1868,32 +1864,6 @@ value_struct_elt (struct value **argp, struct value **args, return v; } - if (destructor_name_p (name, t)) - { - if (!args[1]) - { - /* Destructors are a special case. */ - int m_index, f_index; - - v = NULL; - if (get_destructor_fn_field (t, &m_index, &f_index)) - { - v = value_fn_field (NULL, - TYPE_FN_FIELDLIST1 (t, m_index), - f_index, NULL, 0); - } - if (v == NULL) - error (_("could not find destructor function named %s."), - name); - else - return v; - } - else - { - error (_("destructor should not have any argument")); - } - } - else v = search_struct_method (name, argp, args, 0, static_memfuncp, t); @@ -2499,8 +2469,6 @@ classify_oload_match (struct badness_vector *oload_champ_bv, int destructor_name_p (const char *name, const struct type *type) { - /* Destructors are a special case. */ - if (name[0] == '~') { char *dname = type_name_no_tag (type); @@ -2539,14 +2507,6 @@ check_field (struct type *type, const char *name) /* C++: If it was not found as a data field, then try to return it as a pointer to a method. */ - /* Destructors are a special case. */ - if (destructor_name_p (name, type)) - { - int m_index, f_index; - - return get_destructor_fn_field (type, &m_index, &f_index); - } - for (i = TYPE_NFN_FIELDS (type) - 1; i >= 0; --i) { if (strcmp_iw (TYPE_FN_FIELDLIST_NAME (type, i), name) == 0) @@ -2642,12 +2602,6 @@ value_struct_elt_for_reference (struct type *domain, int offset, /* C++: If it was not found as a data field, then try to return it as a pointer to a method. */ - /* Destructors are a special case. */ - if (destructor_name_p (name, t)) - { - error (_("member pointers to destructors not implemented yet")); - } - /* Perform all necessary dereferencing. */ while (intype && TYPE_CODE (intype) == TYPE_CODE_PTR) intype = TYPE_TARGET_TYPE (intype); |