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/dwarf2out.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/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 67b37eb..721f761 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -10230,9 +10230,7 @@ is_cxx_auto (tree type) { if (is_cxx ()) { - tree name = TYPE_NAME (type); - if (TREE_CODE (name) == TYPE_DECL) - name = DECL_NAME (name); + tree name = TYPE_IDENTIFIER (type); if (name == get_identifier ("auto") || name == get_identifier ("decltype(auto)")) return true; @@ -10509,10 +10507,7 @@ modified_type_die (tree type, int is_const_type, int is_volatile_type, /* This probably indicates a bug. */ else if (mod_type_die && mod_type_die->die_tag == DW_TAG_base_type) { - name = TYPE_NAME (type); - if (name - && TREE_CODE (name) == TYPE_DECL) - name = DECL_NAME (name); + name = TYPE_IDENTIFIER (type); add_name_attribute (mod_type_die, name ? IDENTIFIER_POINTER (name) : "__unknown__"); } @@ -19856,10 +19851,9 @@ gen_type_die_with_usage (tree type, dw_die_ref context_die, dw_die_ref type_die = lookup_type_die (type); if (type_die == NULL) { - tree name = TYPE_NAME (type); - if (TREE_CODE (name) == TYPE_DECL) - name = DECL_NAME (name); - type_die = new_die (DW_TAG_unspecified_type, comp_unit_die (), type); + tree name = TYPE_IDENTIFIER (type); + type_die = new_die (DW_TAG_unspecified_type, comp_unit_die (), + type); add_name_attribute (type_die, IDENTIFIER_POINTER (name)); equate_type_number_to_die (type, type_die); } @@ -19869,9 +19863,7 @@ gen_type_die_with_usage (tree type, dw_die_ref context_die, default: if (is_cxx_auto (type)) { - tree name = TYPE_NAME (type); - if (TREE_CODE (name) == TYPE_DECL) - name = DECL_NAME (name); + tree name = TYPE_IDENTIFIER (type); dw_die_ref *die = (name == get_identifier ("auto") ? &auto_die : &decltype_auto_die); if (!*die) |