diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-01 10:06:45 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-01 10:06:45 +0000 |
commit | a79ad0b39b356a82b01dcc061d52b506bdf631e9 (patch) | |
tree | f75386ffb541630f9a5648bddd8e39156373c57b /gcc/dwarf2out.c | |
parent | ee584ef105d93fbf5b26c76ff37371b58bb3da72 (diff) | |
download | gcc-a79ad0b39b356a82b01dcc061d52b506bdf631e9.tar.gz |
2012-03-01 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 184686 using svnmerge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@184689 138bc75d-0d04-0410-961f-82ee72b054a4
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 5c7d8aabadc..63c46c00ea0 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)) { |