aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2011-07-02 18:13:47 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2011-07-02 18:13:47 +0000
commitbc712852cdef0fad0484d07e6ea0ecca92904c0c (patch)
treed81811c5891ba2622e09eaca7ba4eb4907770a39 /gcc/dwarf2out.c
parent49860194e29e3cb2d571e9f9a413b1858967953e (diff)
downloadgcc-bc712852cdef0fad0484d07e6ea0ecca92904c0c.zip
gcc-bc712852cdef0fad0484d07e6ea0ecca92904c0c.tar.gz
gcc-bc712852cdef0fad0484d07e6ea0ecca92904c0c.tar.bz2
tree.h (TYPE_ARTIFICIAL): New flag.
* tree.h (TYPE_ARTIFICIAL): New flag. * dwarf2out.c (modified_type_die): Add a DW_AT_artificial attribute to the DIE of the type if it is artificial. (gen_array_type_die): Likewise. (gen_enumeration_type_die): Likewise. (gen_struct_or_union_type_die): Likewise. * lto-streamer-in.c (unpack_ts_base_value_fields): Use TYPE_ARTIFICIAL. * lto-streamer-out.c (pack_ts_base_value_fields): Likewise. ada/ * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on the type according to the ARTIFICIAL_P parameter. (create_type_decl): Likewise. (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1. Co-Authored-By: Nicolas Setton <setton@adacore.com> Co-Authored-By: Olivier Hainque <hainque@adacore.com> From-SVN: r175781
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 9ab551d..a0714c4 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -13189,6 +13189,8 @@ modified_type_die (tree type, int is_const_type, int is_volatile_type,
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)
@@ -19444,6 +19446,8 @@ 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)
@@ -19747,6 +19751,8 @@ gen_enumeration_type_die (tree type, dw_die_ref context_die)
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))
@@ -21604,6 +21610,8 @@ gen_struct_or_union_type_die (tree type, dw_die_ref context_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);
}
}
else