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/dbxout.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/dbxout.c')
-rw-r--r-- | gcc/dbxout.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 7a13289..5fbbdf6 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -2159,12 +2159,12 @@ dbxout_type (tree type, int full) another type's definition; instead, output an xref and let the definition come when the name is defined. */ stabstr_S ((TREE_CODE (type) == RECORD_TYPE) ? "xs" : "xu"); - if (TYPE_NAME (type) != 0 - /* The C frontend creates for anonymous variable length - records/unions TYPE_NAME with DECL_NAME NULL. */ - && (TREE_CODE (TYPE_NAME (type)) != TYPE_DECL - || DECL_NAME (TYPE_NAME (type)))) - dbxout_type_name (type); + if (TYPE_IDENTIFIER (type)) + { + /* Note that the C frontend creates for anonymous variable + length records/unions TYPE_NAME with DECL_NAME NULL. */ + dbxout_type_name (type); + } else { stabstr_S ("$$"); @@ -2800,9 +2800,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED) DBX format, and it confuses some tools such as objdump. */ && tree_fits_uhwi_p (TYPE_SIZE (type))) { - tree name = TYPE_NAME (type); - if (TREE_CODE (name) == TYPE_DECL) - name = DECL_NAME (name); + tree name = TYPE_IDENTIFIER (type); dbxout_begin_complex_stabs (); stabstr_I (name); @@ -2859,9 +2857,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED) This is what represents `struct foo' with no typedef. */ /* In C++, the name of a type is the corresponding typedef. In C, it is an IDENTIFIER_NODE. */ - tree name = TYPE_NAME (type); - if (TREE_CODE (name) == TYPE_DECL) - name = DECL_NAME (name); + tree name = TYPE_IDENTIFIER (type); dbxout_begin_complex_stabs (); stabstr_I (name); |