diff options
author | Richard Guenther <rguenther@suse.de> | 2010-09-10 15:38:20 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-09-10 15:38:20 +0000 |
commit | cf6a409750631fd7ae7b168a94967a33d509be5d (patch) | |
tree | eceae12e1d5be3a0e7d30a291af44350fff94446 /gcc/dbxout.c | |
parent | 7ffacec467f1808218d1129c62423684455da2ac (diff) | |
download | gcc-cf6a409750631fd7ae7b168a94967a33d509be5d.zip gcc-cf6a409750631fd7ae7b168a94967a33d509be5d.tar.gz gcc-cf6a409750631fd7ae7b168a94967a33d509be5d.tar.bz2 |
dwarf2out.c (gen_array_type_die): Output DW_TAG_subrange_type for VECTOR_TYPEs using TYPE_VECTOR_SUBPARTS.
2010-09-10 Richard Guenther <rguenther@suse.de>
* dwarf2out.c (gen_array_type_die): Output DW_TAG_subrange_type
for VECTOR_TYPEs using TYPE_VECTOR_SUBPARTS.
* dbxout.c (dbxout_type): Manually deal with VECTOR_TYPE
using TYPE_VECTOR_SUBPARTS, not TYPE_DEBUG_REPRESENTATION_TYPE.
From-SVN: r164192
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r-- | gcc/dbxout.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c index d43a4bf..0b4c050 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -1677,17 +1677,8 @@ static void dbxout_type (tree type, int full) { static int anonymous_type_number = 0; - bool vector_type = false; tree tem, main_variant, low, high; - 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))); - vector_type = true; - } - if (TREE_CODE (type) == INTEGER_TYPE) { if (TREE_TYPE (type) == 0) @@ -2020,9 +2011,6 @@ dbxout_type (tree type, int full) break; } - if (use_gnu_debug_info_extensions && vector_type) - stabstr_S ("@V;"); - /* Output "a" followed by a range type definition for the index type of the array followed by a reference to the target-type. @@ -2049,6 +2037,22 @@ dbxout_type (tree type, int full) dbxout_type (TREE_TYPE (type), 0); break; + case VECTOR_TYPE: + /* Make vectors look like an array. */ + if (use_gnu_debug_info_extensions) + stabstr_S ("@V;"); + + /* Output "a" followed by a range type definition + for the index type of the array + followed by a reference to the target-type. + ar1;0;N;M for a C array of type M and size N+1. */ + stabstr_C ('a'); + dbxout_range_type (integer_type_node, size_zero_node, + size_int (TYPE_VECTOR_SUBPARTS (type) - 1)); + + dbxout_type (TREE_TYPE (type), 0); + break; + case RECORD_TYPE: case UNION_TYPE: case QUAL_UNION_TYPE: |