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/utils.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/utils.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index cfa0791..44877b6 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -706,10 +706,8 @@ make_aligning_type (tree type, unsigned int align, tree size, tree vblock_addr_st = size_binop (PLUS_EXPR, record_addr_st, room_st); tree voffset_st, pos, field; - tree name = TYPE_NAME (type); + tree name = TYPE_IDENTIFIER (type); - if (TREE_CODE (name) == TYPE_DECL) - name = DECL_NAME (name); name = concat_name (name, "ALIGN"); TYPE_NAME (record_type) = name; @@ -1203,14 +1201,8 @@ maybe_pad_type (tree type, tree size, unsigned int align, && DECL_IGNORED_P (TYPE_NAME (type)))) { tree marker = make_node (RECORD_TYPE); - tree name = TYPE_NAME (record); - tree orig_name = TYPE_NAME (type); - - if (TREE_CODE (name) == TYPE_DECL) - name = DECL_NAME (name); - - if (TREE_CODE (orig_name) == TYPE_DECL) - orig_name = DECL_NAME (orig_name); + tree name = TYPE_IDENTIFIER (record); + tree orig_name = TYPE_IDENTIFIER (type); TYPE_NAME (marker) = concat_name (name, "XVS"); finish_record_type (marker, @@ -1419,7 +1411,7 @@ finish_record_type (tree record_type, tree field_list, int rep_level, bool debug_info_p) { enum tree_code code = TREE_CODE (record_type); - tree name = TYPE_NAME (record_type); + tree name = TYPE_IDENTIFIER (record_type); tree ada_size = bitsize_zero_node; tree size = bitsize_zero_node; bool had_size = TYPE_SIZE (record_type) != 0; @@ -1431,8 +1423,6 @@ finish_record_type (tree record_type, tree field_list, int rep_level, /* Always attach the TYPE_STUB_DECL for a record type. It is required to generate debug info and have a parallel type. */ - if (name && TREE_CODE (name) == TYPE_DECL) - name = DECL_NAME (name); TYPE_STUB_DECL (record_type) = create_type_stub_decl (name, record_type); /* Globally initialize the record first. If this is a rep'ed record, @@ -1692,13 +1682,10 @@ rest_of_record_type_compilation (tree record_type) tree new_record_type = make_node (TREE_CODE (record_type) == QUAL_UNION_TYPE ? UNION_TYPE : TREE_CODE (record_type)); - tree orig_name = TYPE_NAME (record_type), new_name; + tree orig_name = TYPE_IDENTIFIER (record_type), new_name; tree last_pos = bitsize_zero_node; tree old_field, prev_old_field = NULL_TREE; - if (TREE_CODE (orig_name) == TYPE_DECL) - orig_name = DECL_NAME (orig_name); - new_name = concat_name (orig_name, TREE_CODE (record_type) == QUAL_UNION_TYPE ? "XVU" : "XVE"); |