* stabsread.c (read_member_functions): Remove skip code for duplicate
constructor/destructor methods. Use standard parsing for these methods and just do not chain them to the list of methods after parsing.
This commit is contained in:
parent
1da54d81fd
commit
0c86755622
|
@ -1,3 +1,10 @@
|
||||||
|
2002-03-19 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
|
||||||
|
|
||||||
|
* stabsread.c (read_member_functions): Remove skip code for duplicate
|
||||||
|
constructor/destructor methods. Use standard parsing for these
|
||||||
|
methods and just do not chain them to the list of methods after
|
||||||
|
parsing.
|
||||||
|
|
||||||
2002-03-19 Alexandre Oliva <aoliva@redhat.com>
|
2002-03-19 Alexandre Oliva <aoliva@redhat.com>
|
||||||
|
|
||||||
* coffread.c: Remove redundant static declarations. Replace
|
* coffread.c: Remove redundant static declarations. Replace
|
||||||
|
|
|
@ -3037,7 +3037,6 @@ read_member_functions (struct field_info *fip, char **pp, struct type *type,
|
||||||
{
|
{
|
||||||
int nfn_fields = 0;
|
int nfn_fields = 0;
|
||||||
int length = 0;
|
int length = 0;
|
||||||
int skip_method;
|
|
||||||
/* Total number of member functions defined in this class. If the class
|
/* Total number of member functions defined in this class. If the class
|
||||||
defines two `f' functions, and one `g' function, then this will have
|
defines two `f' functions, and one `g' function, then this will have
|
||||||
the value 3. */
|
the value 3. */
|
||||||
|
@ -3077,36 +3076,6 @@ read_member_functions (struct field_info *fip, char **pp, struct type *type,
|
||||||
look_ahead_type = NULL;
|
look_ahead_type = NULL;
|
||||||
length = 0;
|
length = 0;
|
||||||
|
|
||||||
skip_method = 0;
|
|
||||||
if (p - *pp == strlen ("__base_ctor")
|
|
||||||
&& strncmp (*pp, "__base_ctor", strlen ("__base_ctor")) == 0)
|
|
||||||
skip_method = 1;
|
|
||||||
else if (p - *pp == strlen ("__base_dtor")
|
|
||||||
&& strncmp (*pp, "__base_dtor", strlen ("__base_dtor")) == 0)
|
|
||||||
skip_method = 1;
|
|
||||||
else if (p - *pp == strlen ("__deleting_dtor")
|
|
||||||
&& strncmp (*pp, "__deleting_dtor",
|
|
||||||
strlen ("__deleting_dtor")) == 0)
|
|
||||||
skip_method = 1;
|
|
||||||
|
|
||||||
if (skip_method)
|
|
||||||
{
|
|
||||||
/* Skip past '::'. */
|
|
||||||
*pp = p + 2;
|
|
||||||
/* Read the type. */
|
|
||||||
read_type (pp, objfile);
|
|
||||||
/* Skip past the colon, mangled name, semicolon, flags, and final
|
|
||||||
semicolon. */
|
|
||||||
while (**pp != ';')
|
|
||||||
(*pp) ++;
|
|
||||||
(*pp) ++;
|
|
||||||
while (**pp != ';')
|
|
||||||
(*pp) ++;
|
|
||||||
(*pp) ++;
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
new_fnlist = (struct next_fnfieldlist *)
|
new_fnlist = (struct next_fnfieldlist *)
|
||||||
xmalloc (sizeof (struct next_fnfieldlist));
|
xmalloc (sizeof (struct next_fnfieldlist));
|
||||||
make_cleanup (xfree, new_fnlist);
|
make_cleanup (xfree, new_fnlist);
|
||||||
|
@ -3332,7 +3301,18 @@ read_member_functions (struct field_info *fip, char **pp, struct type *type,
|
||||||
while (**pp != ';' && **pp != '\0');
|
while (**pp != ';' && **pp != '\0');
|
||||||
|
|
||||||
(*pp)++;
|
(*pp)++;
|
||||||
|
STABS_CONTINUE (pp, objfile);
|
||||||
|
|
||||||
|
/* Skip GCC 3.X member functions which are duplicates of the callable
|
||||||
|
constructor/destructor. */
|
||||||
|
if (strcmp (main_fn_name, "__base_ctor") == 0
|
||||||
|
|| strcmp (main_fn_name, "__base_dtor") == 0
|
||||||
|
|| strcmp (main_fn_name, "__deleting_dtor") == 0)
|
||||||
|
{
|
||||||
|
xfree (main_fn_name);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
new_fnlist->fn_fieldlist.fn_fields = (struct fn_field *)
|
new_fnlist->fn_fieldlist.fn_fields = (struct fn_field *)
|
||||||
obstack_alloc (&objfile->type_obstack,
|
obstack_alloc (&objfile->type_obstack,
|
||||||
sizeof (struct fn_field) * length);
|
sizeof (struct fn_field) * length);
|
||||||
|
@ -3348,7 +3328,7 @@ read_member_functions (struct field_info *fip, char **pp, struct type *type,
|
||||||
fip->fnlist = new_fnlist;
|
fip->fnlist = new_fnlist;
|
||||||
nfn_fields++;
|
nfn_fields++;
|
||||||
total_length += length;
|
total_length += length;
|
||||||
STABS_CONTINUE (pp, objfile);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nfn_fields)
|
if (nfn_fields)
|
||||||
|
|
Loading…
Reference in New Issue