dwarf2out.c (add_incomplete_type): New fn.
* dwarf2out.c (add_incomplete_type): New fn. (gen_struct_or_union_type_die): Call it. (retry_incomplete_types): New fn. (dwarf2out_finish): Call it. From-SVN: r27325
This commit is contained in:
parent
ec1f6a38ef
commit
8a8c36562f
@ -1,3 +1,10 @@
|
|||||||
|
Thu Jun 3 02:15:07 1999 Jason Merrill <jason@yorick.cygnus.com>
|
||||||
|
|
||||||
|
* dwarf2out.c (add_incomplete_type): New fn.
|
||||||
|
(gen_struct_or_union_type_die): Call it.
|
||||||
|
(retry_incomplete_types): New fn.
|
||||||
|
(dwarf2out_finish): Call it.
|
||||||
|
|
||||||
Thu Jun 3 01:19:03 1999 Jeffrey A Law (law@cygnus.com)
|
Thu Jun 3 01:19:03 1999 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
* gcse.c (insert_insn_end_bb): Correct placement of insns when the
|
* gcse.c (insert_insn_end_bb): Correct placement of insns when the
|
||||||
|
@ -2426,6 +2426,22 @@ static unsigned pending_types;
|
|||||||
be enough for most typical programs. */
|
be enough for most typical programs. */
|
||||||
#define PENDING_TYPES_INCREMENT 64
|
#define PENDING_TYPES_INCREMENT 64
|
||||||
|
|
||||||
|
/* A pointer to the base of a list of incomplete types which might be
|
||||||
|
completed at some later time. */
|
||||||
|
|
||||||
|
static tree *incomplete_types_list;
|
||||||
|
|
||||||
|
/* Number of elements currently allocated for the incomplete_types_list. */
|
||||||
|
static unsigned incomplete_types_allocated;
|
||||||
|
|
||||||
|
/* Number of elements of incomplete_types_list currently in use. */
|
||||||
|
static unsigned incomplete_types;
|
||||||
|
|
||||||
|
/* Size (in elements) of increments by which we may expand the incomplete
|
||||||
|
types list. Actually, a single hunk of space of this size should
|
||||||
|
be enough for most typical programs. */
|
||||||
|
#define INCOMPLETE_TYPES_INCREMENT 64
|
||||||
|
|
||||||
/* Record whether the function being analyzed contains inlined functions. */
|
/* Record whether the function being analyzed contains inlined functions. */
|
||||||
static int current_function_has_inlines;
|
static int current_function_has_inlines;
|
||||||
#if 0 && defined (MIPS_DEBUGGING_INFO)
|
#if 0 && defined (MIPS_DEBUGGING_INFO)
|
||||||
@ -8035,6 +8051,39 @@ output_pending_types_for_scope (context_die)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Remember a type in the incomplete_types_list. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
add_incomplete_type (type)
|
||||||
|
tree type;
|
||||||
|
{
|
||||||
|
if (incomplete_types == incomplete_types_allocated)
|
||||||
|
{
|
||||||
|
incomplete_types_allocated += INCOMPLETE_TYPES_INCREMENT;
|
||||||
|
incomplete_types_list
|
||||||
|
= (tree *) xrealloc (incomplete_types_list,
|
||||||
|
sizeof (tree) * incomplete_types_allocated);
|
||||||
|
}
|
||||||
|
|
||||||
|
incomplete_types_list[incomplete_types++] = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Walk through the list of incomplete types again, trying once more to
|
||||||
|
emit full debugging info for them. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
retry_incomplete_types ()
|
||||||
|
{
|
||||||
|
register tree type;
|
||||||
|
|
||||||
|
while (incomplete_types)
|
||||||
|
{
|
||||||
|
--incomplete_types;
|
||||||
|
type = incomplete_types_list[incomplete_types];
|
||||||
|
gen_type_die (type, comp_unit_die);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Generate a DIE to represent an inlined instance of an enumeration type. */
|
/* Generate a DIE to represent an inlined instance of an enumeration type. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -9026,7 +9075,10 @@ gen_struct_or_union_type_die (type, context_die)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
add_AT_flag (type_die, DW_AT_declaration, 1);
|
{
|
||||||
|
add_AT_flag (type_die, DW_AT_declaration, 1);
|
||||||
|
add_incomplete_type (type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Generate a DIE for a subroutine _type_. */
|
/* Generate a DIE for a subroutine _type_. */
|
||||||
@ -9995,6 +10047,10 @@ dwarf2out_finish ()
|
|||||||
free (node);
|
free (node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Walk through the list of incomplete types again, trying once more to
|
||||||
|
emit full debugging info for them. */
|
||||||
|
retry_incomplete_types ();
|
||||||
|
|
||||||
/* Traverse the DIE tree and add sibling attributes to those DIE's
|
/* Traverse the DIE tree and add sibling attributes to those DIE's
|
||||||
that have children. */
|
that have children. */
|
||||||
add_sibling_attributes (comp_unit_die);
|
add_sibling_attributes (comp_unit_die);
|
||||||
|
Loading…
Reference in New Issue
Block a user