diff options
author | Jason Merrill <jason@redhat.com> | 2002-04-24 14:49:51 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2002-04-24 14:49:51 -0400 |
commit | 84f0ace0642a089725b994a15c3fe799f61b6403 (patch) | |
tree | 7d4e2f6a38aea2957284229abf82a028d629658e | |
parent | 120eaf28cd945e6c0a8cc02bc275c4e6dd614116 (diff) | |
download | gcc-84f0ace0642a089725b994a15c3fe799f61b6403.zip gcc-84f0ace0642a089725b994a15c3fe799f61b6403.tar.gz gcc-84f0ace0642a089725b994a15c3fe799f61b6403.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/dwarf2.h | 1 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 21 |
3 files changed, 23 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5e39a7c..5cb9f19 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2002-04-24 Jason Merrill <jason@redhat.com> + + * 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 <rth@redhat.com> * config/mips/mips.md (movdi_usd): Renumber. diff --git a/gcc/dwarf2.h b/gcc/dwarf2.h index 0d433c3..a84eb2c 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 b7a6d25..71c54e9 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: |