diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2012-02-29 18:28:41 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2012-02-29 18:28:41 +0000 |
commit | fd7876407c7ff2ca489861538b886393a95efa8d (patch) | |
tree | d7a052206dec8e0150c21d87cffdc18eb54d0f4e /gcc/dwarf2out.c | |
parent | a3017cf147db82ad86e5a81b9677e8ca8e29ead2 (diff) | |
download | gcc-fd7876407c7ff2ca489861538b886393a95efa8d.zip gcc-fd7876407c7ff2ca489861538b886393a95efa8d.tar.gz gcc-fd7876407c7ff2ca489861538b886393a95efa8d.tar.bz2 |
dwarf2out.c (modified_type_die): Set DW_AT_GNAT_descriptive_type and DW_AT_artificial attributes at the end of...
* dwarf2out.c (modified_type_die): Set DW_AT_GNAT_descriptive_type and
DW_AT_artificial attributes at the end of the processing.
(gen_array_type_die): Likewise.
(gen_enumeration_type_die): Likewise.
(gen_struct_or_union_type_die): Likewise.
(add_gnat_descriptive_type_attribute): Do not suppress debug info for
the parent type.
ada/
* gcc-interface/decl.c (components_to_record): Add ARTIFICIAL parameter
and set TYPE_ARTIFICIAL according to it. Adjust recursive call.
(gnat_to_gnu_entity) <E_Record_Type>: Adjust call to above function.
* gcc-interface/utils.c (rest_of_record_type_compilation): Do not
invoke rest_of_type_decl_compilation on the parallel type, if any.
From-SVN: r184667
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 5c7d8aa..63c46c0 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -9929,9 +9929,6 @@ modified_type_die (tree type, int is_const_type, int is_volatile_type, useful source coordinates anyway. */ name = DECL_NAME (name); add_name_attribute (mod_type_die, IDENTIFIER_POINTER (name)); - add_gnat_descriptive_type_attribute (mod_type_die, type, context_die); - if (TYPE_ARTIFICIAL (type)) - add_AT_flag (mod_type_die, DW_AT_artificial, 1); } /* This probably indicates a bug. */ else if (mod_type_die && mod_type_die->die_tag == DW_TAG_base_type) @@ -9960,6 +9957,10 @@ modified_type_die (tree type, int is_const_type, int is_volatile_type, if (sub_die != NULL) add_AT_die_ref (mod_type_die, DW_AT_type, sub_die); + add_gnat_descriptive_type_attribute (mod_type_die, type, context_die); + if (TYPE_ARTIFICIAL (type)) + add_AT_flag (mod_type_die, DW_AT_artificial, 1); + return mod_type_die; } @@ -15493,11 +15494,7 @@ add_gnat_descriptive_type_attribute (dw_die_ref die, tree type, dtype_die = lookup_type_die (dtype); if (!dtype_die) { - /* The descriptive type indirectly references TYPE if this is also the - case for TYPE itself. Do not deal with the circularity here. */ - TYPE_DECL_SUPPRESS_DEBUG (TYPE_STUB_DECL (type)) = 1; gen_type_die (dtype, context_die); - TYPE_DECL_SUPPRESS_DEBUG (TYPE_STUB_DECL (type)) = 0; dtype_die = lookup_type_die (dtype); gcc_assert (dtype_die); } @@ -16384,9 +16381,6 @@ gen_array_type_die (tree type, dw_die_ref context_die) array_die = new_die (DW_TAG_array_type, scope_die, type); add_name_attribute (array_die, type_tag (type)); - add_gnat_descriptive_type_attribute (array_die, type, context_die); - if (TYPE_ARTIFICIAL (type)) - add_AT_flag (array_die, DW_AT_artificial, 1); equate_type_number_to_die (type, array_die); if (TREE_CODE (type) == VECTOR_TYPE) @@ -16446,6 +16440,10 @@ gen_array_type_die (tree type, dw_die_ref context_die) add_type_attribute (array_die, element_type, 0, 0, context_die); + add_gnat_descriptive_type_attribute (array_die, type, context_die); + if (TYPE_ARTIFICIAL (type)) + add_AT_flag (array_die, DW_AT_artificial, 1); + if (get_AT (array_die, DW_AT_name)) add_pubtype (type, array_die); } @@ -16689,9 +16687,6 @@ gen_enumeration_type_die (tree type, dw_die_ref context_die) scope_die_for (type, context_die), type); equate_type_number_to_die (type, type_die); add_name_attribute (type_die, type_tag (type)); - add_gnat_descriptive_type_attribute (type_die, type, context_die); - if (TYPE_ARTIFICIAL (type)) - add_AT_flag (type_die, DW_AT_artificial, 1); if (dwarf_version >= 4 || !dwarf_strict) { if (ENUM_IS_SCOPED (type)) @@ -16747,6 +16742,10 @@ gen_enumeration_type_die (tree type, dw_die_ref context_die) add_AT_int (enum_die, DW_AT_const_value, tree_low_cst (value, tree_int_cst_sgn (value) > 0)); } + + add_gnat_descriptive_type_attribute (type_die, type, context_die); + if (TYPE_ARTIFICIAL (type)) + add_AT_flag (type_die, DW_AT_artificial, 1); } else add_AT_flag (type_die, DW_AT_declaration, 1); @@ -18659,12 +18658,7 @@ gen_struct_or_union_type_die (tree type, dw_die_ref context_die, if (old_die) add_AT_specification (type_die, old_die); else - { - add_name_attribute (type_die, type_tag (type)); - add_gnat_descriptive_type_attribute (type_die, type, context_die); - if (TYPE_ARTIFICIAL (type)) - add_AT_flag (type_die, DW_AT_artificial, 1); - } + add_name_attribute (type_die, type_tag (type)); } else remove_AT (type_die, DW_AT_declaration); @@ -18697,6 +18691,10 @@ gen_struct_or_union_type_die (tree type, dw_die_ref context_die, gen_member_die (type, type_die); pop_decl_scope (); + add_gnat_descriptive_type_attribute (type_die, type, context_die); + if (TYPE_ARTIFICIAL (type)) + add_AT_flag (type_die, DW_AT_artificial, 1); + /* GNU extension: Record what type our vtable lives in. */ if (TYPE_VFIELD (type)) { |