aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorJ. Brobecker <brobecker@gnat.com>2004-01-14 02:52:40 +0000
committerJoel Brobecker <brobecke@gcc.gnu.org>2004-01-14 02:52:40 +0000
commitb98d154e3eddc1812f391f11ca060eda6f17201d (patch)
tree8241c4c05ef37911c15644d5cbfe1503e13fc9ec /gcc/dwarf2out.c
parent8dd8b815f4b1fc0524ac67f10fd7fb98981ad271 (diff)
downloadgcc-b98d154e3eddc1812f391f11ca060eda6f17201d.zip
gcc-b98d154e3eddc1812f391f11ca060eda6f17201d.tar.gz
gcc-b98d154e3eddc1812f391f11ca060eda6f17201d.tar.bz2
dwarf2out.c (is_ada_subrange_type): No longer check the TYPE_NAME.
* dwarf2out.c (is_ada_subrange_type): No longer check the TYPE_NAME. (subrange_type_die): Add handle for nameless subrange types. From-SVN: r75838
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 54ed7bb..5f75d29 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -7820,7 +7820,6 @@ is_ada_subrange_type (tree type)
if (is_ada ()
&& TREE_CODE (type) == INTEGER_TYPE
- && TYPE_NAME (type) != NULL_TREE
&& subtype != NULL_TREE)
{
if (TREE_CODE (subtype) == INTEGER_TYPE && TREE_UNSIGNED (subtype))
@@ -7849,11 +7848,15 @@ subrange_type_die (tree type, dw_die_ref context_die)
else
subtype_die = base_type_die (TREE_TYPE (type));
- if (TREE_CODE (name) == TYPE_DECL)
- name = DECL_NAME (name);
-
subrange_die = new_die (DW_TAG_subrange_type, context_die, type);
- add_name_attribute (subrange_die, IDENTIFIER_POINTER (name));
+
+ if (name != NULL)
+ {
+ if (TREE_CODE (name) == TYPE_DECL)
+ name = DECL_NAME (name);
+ add_name_attribute (subrange_die, IDENTIFIER_POINTER (name));
+ }
+
if (TYPE_MIN_VALUE (type) != NULL)
add_bound_info (subrange_die, DW_AT_lower_bound,
TYPE_MIN_VALUE (type));