it. */
static GTY(()) vec<tree, va_gc> *incomplete_types;
-/* A pointer to the base of a table of references to declaration
- scopes. This table is a display which tracks the nesting
- of declaration scopes at the current scope and containing
- scopes. This table is used to find the proper place to
- define type declaration DIE's. */
-static GTY(()) vec<tree, va_gc> *decl_scope_table;
-
/* Pointers to various DWARF2 sections. */
static GTY(()) section *debug_info_section;
static GTY(()) section *debug_skeleton_info_section;
static void add_discr_value (dw_die_ref, dw_discr_value *);
static void add_discr_list (dw_die_ref, dw_discr_list_ref);
static inline dw_discr_list_ref AT_discr_list (dw_attr_node *);
-static void push_decl_scope (tree);
-static void pop_decl_scope (void);
static dw_die_ref scope_die_for (tree, dw_die_ref);
static inline int local_scope_p (dw_die_ref);
static inline int class_scope_p (dw_die_ref);
}
#endif /* VMS_DEBUGGING_INFO */
-/* Push a new declaration scope. */
-
-static void
-push_decl_scope (tree scope)
-{
- vec_safe_push (decl_scope_table, scope);
-}
-
-/* Pop a declaration scope. */
-
-static inline void
-pop_decl_scope (void)
-{
- decl_scope_table->pop ();
-}
-
/* walk_tree helper function for uses_local_type, below. */
static tree
dw_die_ref type_die;
gcc_assert (!decl_ultimate_origin (member));
- push_decl_scope (type);
type_die = lookup_type_die_strip_naming_typedef (type);
if (TREE_CODE (member) == FUNCTION_DECL)
gen_subprogram_die (member, type_die);
}
else
gen_variable_die (member, NULL_TREE, type_die);
-
- pop_decl_scope ();
}
}
\f
if (type_die->die_parent == NULL)
add_child_die (scope_die, type_die);
- push_decl_scope (type);
gen_member_die (type, type_die);
- pop_decl_scope ();
add_gnat_descriptive_type_attribute (type_die, type, context_die);
if (TYPE_ARTIFICIAL (type))
dw_die_ref context_die,
enum debug_info_usage usage)
{
- int need_pop;
-
if (type == NULL_TREE
|| !is_tagged_type (type))
return;
if (TREE_ASM_WRITTEN (type))
- need_pop = 0;
+ ;
/* If this is a nested type whose containing class hasn't been written
out yet, writing it out will cover this one, too. This does not apply
to instantiations of member class templates; they need to be added to
return;
/* If that failed, attach ourselves to the stub. */
- push_decl_scope (TYPE_CONTEXT (type));
context_die = lookup_type_die (TYPE_CONTEXT (type));
- need_pop = 1;
}
else if (TYPE_CONTEXT (type) != NULL_TREE
&& (TREE_CODE (TYPE_CONTEXT (type)) == FUNCTION_DECL))
specification. */
if (context_die && is_declaration_die (context_die))
context_die = NULL;
- need_pop = 0;
}
else
- {
- context_die = declare_in_namespace (type, context_die);
- need_pop = 0;
- }
+ context_die = declare_in_namespace (type, context_die);
if (TREE_CODE (type) == ENUMERAL_TYPE)
{
else
gen_struct_or_union_type_die (type, context_die, usage);
- if (need_pop)
- pop_decl_scope ();
-
/* Don't set TREE_ASM_WRITTEN on an incomplete struct; we want to fix
it up if it is ever completed. gen_*_type_die will set it for us
when appropriate. */
/* Allocate the cached_dw_loc_list_table. */
cached_dw_loc_list_table = hash_table<dw_loc_list_hasher>::create_ggc (10);
- /* Allocate the initial hunk of the decl_scope_table. */
- vec_alloc (decl_scope_table, 256);
-
/* Allocate the initial hunk of the abbrev_die_table. */
vec_alloc (abbrev_die_table, 256);
/* Zero-th entry is allocated, but unused. */
cached_next_real_insn = NULL;
used_rtx_array = NULL;
incomplete_types = NULL;
- decl_scope_table = NULL;
debug_info_section = NULL;
debug_skeleton_info_section = NULL;
debug_abbrev_section = NULL;