summaryrefslogtreecommitdiff
path: root/gcc/dbxout.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-17 13:19:46 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-17 13:19:46 +0000
commitb4f314ea97f04620d290f3ae25d831f46692864f (patch)
treee99df6f0f35dce95dacd7a91b0242e81462a0860 /gcc/dbxout.c
parent644412e1c29a2984b1b37656c18fe9f33791eff1 (diff)
parent7de380af566c189319d706d3b4ab04e32ecc5d90 (diff)
downloadgcc-b4f314ea97f04620d290f3ae25d831f46692864f.tar.gz
Merge from trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@209485 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r--gcc/dbxout.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index a44f8b0f4ed..f8618db357a 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -2110,12 +2110,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 ("$$");
@@ -2748,9 +2748,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);
@@ -2807,9 +2805,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);