From 84f0ace0642a089725b994a15c3fe799f61b6403 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 24 Apr 2002 14:49:51 -0400 Subject: [PATCH] dwarf2.h (enum dwarf_attribute): Add DW_AT_GNU_vector. * dwarf2.h (enum dwarf_attribute): Add DW_AT_GNU_vector. * dwarf2out.c (dwarf_attr_name): Support it. (gen_array_type_die): Emit it. (lookup_type_die): No special handling for VECTOR_TYPE. (gen_type_die): Hand VECTOR_TYPE off to gen_array_type_die. From-SVN: r52724 --- gcc/ChangeLog | 8 ++++++++ gcc/dwarf2.h | 1 + gcc/dwarf2out.c | 21 ++++++++++++++------- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5e39a7cc6ba..5cb9f192b24 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2002-04-24 Jason Merrill + + * dwarf2.h (enum dwarf_attribute): Add DW_AT_GNU_vector. + * dwarf2out.c (dwarf_attr_name): Support it. + (gen_array_type_die): Emit it. + (lookup_type_die): No special handling for VECTOR_TYPE. + (gen_type_die): Hand VECTOR_TYPE off to gen_array_type_die. + 2002-04-24 Richard Henderson * config/mips/mips.md (movdi_usd): Renumber. diff --git a/gcc/dwarf2.h b/gcc/dwarf2.h index 0d433c32542..a84eb2cabd1 100644 --- a/gcc/dwarf2.h +++ b/gcc/dwarf2.h @@ -239,6 +239,7 @@ enum dwarf_attribute DW_AT_src_coords = 0x2104, DW_AT_body_begin = 0x2105, DW_AT_body_end = 0x2106, + DW_AT_GNU_vector = 0x2107, /* VMS Extensions. */ DW_AT_VMS_rtnbeg_pd_address = 0x2201 }; diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index b7a6d255fb2..71c54e9eb44 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -4171,6 +4171,9 @@ dwarf_attr_name (attr) return "DW_AT_body_begin"; case DW_AT_body_end: return "DW_AT_body_end"; + case DW_AT_GNU_vector: + return "DW_AT_GNU_vector"; + case DW_AT_VMS_rtnbeg_pd_address: return "DW_AT_VMS_rtnbeg_pd_address"; @@ -5111,9 +5114,6 @@ static inline dw_die_ref lookup_type_die (type) tree type; { - if (TREE_CODE (type) == VECTOR_TYPE) - type = TYPE_DEBUG_REPRESENTATION_TYPE (type); - return (dw_die_ref) TYPE_SYMTAB_POINTER (type); } @@ -9767,6 +9767,16 @@ gen_array_type_die (type, context_die) #endif array_die = new_die (DW_TAG_array_type, scope_die, type); + add_name_attribute (array_die, type_tag (type)); + equate_type_number_to_die (type, array_die); + + if (TREE_CODE (type) == VECTOR_TYPE) + { + /* The frontend feeds us a representation for the vector as a struct + containing an array. Pull out the array type. */ + type = TREE_TYPE (TYPE_FIELDS (TYPE_DEBUG_REPRESENTATION_TYPE (type))); + add_AT_flag (array_die, DW_AT_GNU_vector, 1); + } #if 0 /* We default the array ordering. SDB will probably do @@ -9788,9 +9798,6 @@ gen_array_type_die (type, context_die) #endif add_subscript_info (array_die, type); - add_name_attribute (array_die, type_tag (type)); - equate_type_number_to_die (type, array_die); - /* Add representation of the type of the elements of this array type. */ element_type = TREE_TYPE (type); @@ -11133,7 +11140,7 @@ gen_type_die (type, context_die) break; case VECTOR_TYPE: - gen_type_die (TYPE_DEBUG_REPRESENTATION_TYPE (type), context_die); + gen_array_type_die (type, context_die); break; case ENUMERAL_TYPE: -- 2.30.2