diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2014-04-14 18:10:27 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2014-04-14 18:10:27 +0000 |
commit | 9dba4b5565efd56bcfadecc173ed66947492153e (patch) | |
tree | 69e44b94b1e113ea11da33d2c74ff5fbcc37315b /gcc/ada/gcc-interface/decl.c | |
parent | 006202e8c05177e883ff174d56834cafc43c8165 (diff) | |
download | gcc-9dba4b5565efd56bcfadecc173ed66947492153e.zip gcc-9dba4b5565efd56bcfadecc173ed66947492153e.tar.gz gcc-9dba4b5565efd56bcfadecc173ed66947492153e.tar.bz2 |
tree.h (TYPE_IDENTIFIER): Declare.
2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
* tree.h (TYPE_IDENTIFIER): Declare.
* tree.c (subrange_type_for_debug_p): Use it.
* godump.c (go_format_type): Likewise.
* dwarf2out.c (is_cxx_auto, modified_type_die,
gen_type_die_with_usage, gen_type_die_with_usage): Likewise.
* dbxout.c (dbxout_type, dbxout_symbol): Likewise.
/cp
2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
* cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
/objcp
2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
* objcp-decl.h (OBJC_TYPE_NAME, OBJC_SET_TYPE_NAME): Use
TYPE_IDENTIFIER.
/ada
2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
* gcc-interface/decl.c (gnat_to_gnu_entity, components_to_record):
Use TYPE_IDENTIFIER.
* gcc-interface/utils.c (make_aligning_type, maybe_pad_type,
finish_record_type, rest_of_record_type_compilation): Likewise.
From-SVN: r209390
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index ae512b0..f3f3d6d 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -2671,10 +2671,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) for (index = ndim - 1; index >= 0; index--) { tree gnu_index = TYPE_INDEX_TYPE (gnu_index_types[index]); - tree gnu_index_name = TYPE_NAME (gnu_index); - - if (TREE_CODE (gnu_index_name) == TYPE_DECL) - gnu_index_name = DECL_NAME (gnu_index_name); + tree gnu_index_name = TYPE_IDENTIFIER (gnu_index); /* Make sure to reference the types themselves, and not just their names, as the debugger may fall back on them. */ @@ -3652,12 +3649,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) if (debug_info_p) { tree gnu_subtype_marker = make_node (RECORD_TYPE); - tree gnu_unpad_base_name = TYPE_NAME (gnu_unpad_base_type); + tree gnu_unpad_base_name + = TYPE_IDENTIFIER (gnu_unpad_base_type); tree gnu_size_unit = TYPE_SIZE_UNIT (gnu_type); - if (TREE_CODE (gnu_unpad_base_name) == TYPE_DECL) - gnu_unpad_base_name = DECL_NAME (gnu_unpad_base_name); - TYPE_NAME (gnu_subtype_marker) = create_concat_name (gnat_entity, "XVS"); finish_record_type (gnu_subtype_marker, @@ -4976,11 +4971,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) false, !gnu_decl, definition, false); if (TYPE_IS_PADDING_P (gnu_type)) - { - gnu_entity_name = TYPE_NAME (gnu_type); - if (TREE_CODE (gnu_entity_name) == TYPE_DECL) - gnu_entity_name = DECL_NAME (gnu_entity_name); - } + gnu_entity_name = TYPE_IDENTIFIER (gnu_type); /* Now set the RM size of the type. We cannot do it before padding because we need to accept arbitrary RM sizes on integral types. */ @@ -7035,7 +7026,7 @@ components_to_record (tree gnu_record_type, Node_Id gnat_component_list, { Node_Id gnat_discr = Name (variant_part), variant; tree gnu_discr = gnat_to_gnu (gnat_discr); - tree gnu_name = TYPE_NAME (gnu_record_type); + tree gnu_name = TYPE_IDENTIFIER (gnu_record_type); tree gnu_var_name = concat_name (get_identifier (Get_Name_String (Chars (gnat_discr))), "XVN"); @@ -7047,9 +7038,6 @@ components_to_record (tree gnu_record_type, Node_Id gnat_component_list, unsigned int variants_align = 0; unsigned int i; - if (TREE_CODE (gnu_name) == TYPE_DECL) - gnu_name = DECL_NAME (gnu_name); - gnu_union_name = concat_name (gnu_name, IDENTIFIER_POINTER (gnu_var_name)); |