aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2014-04-15 14:31:40 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2014-04-15 14:31:40 +0000
commitfe9208efaf5a745526539330b3353418ab711d7d (patch)
tree170963879feb2a359bfeff0ed79a4cc04f0f1f53 /gcc
parent98a2fdfba6290cc34485d77edfd0a092871ae7fc (diff)
downloadgcc-fe9208efaf5a745526539330b3353418ab711d7d.zip
gcc-fe9208efaf5a745526539330b3353418ab711d7d.tar.gz
gcc-fe9208efaf5a745526539330b3353418ab711d7d.tar.bz2
decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
2014-04-15 Paolo Carlini <paolo.carlini@oracle.com> * decl.c (duplicate_decls): Remove redundant TYPE_NAME use. * name-lookup.c (pushdecl_maybe_friend_1): Likewise. (do_class_using_decl): Likewise. * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING. From-SVN: r209420
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/decl.c1
-rw-r--r--gcc/cp/mangle.c2
-rw-r--r--gcc/cp/name-lookup.c3
4 files changed, 9 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index eb988c0..4a50a2d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
+ * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
+ (do_class_using_decl): Likewise.
+ * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
+
2014-04-15 Jakub Jelinek <jakub@redhat.com>
PR plugins/59335
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index f8ae07c..f80f94a 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -1380,7 +1380,6 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
tree t = TREE_VALUE (t1);
if (TYPE_PTR_P (t)
- && TYPE_NAME (TREE_TYPE (t))
&& TYPE_IDENTIFIER (TREE_TYPE (t))
== get_identifier ("FILE")
&& compparms (TREE_CHAIN (t1), TREE_CHAIN (t2)))
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index da82dd6..84d10a0 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -323,7 +323,7 @@ dump_substitution_candidates (void)
else if (TREE_CODE (el) == TREE_LIST)
name = IDENTIFIER_POINTER (DECL_NAME (TREE_VALUE (el)));
else if (TYPE_NAME (el))
- name = IDENTIFIER_POINTER (TYPE_IDENTIFIER (el));
+ name = TYPE_NAME_STRING (el);
fprintf (stderr, " S%d_ = ", i - 1);
if (TYPE_P (el) &&
(CP_TYPE_RESTRICT_P (el)
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 8ad0d06..d900560 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -945,7 +945,6 @@ pushdecl_maybe_friend_1 (tree x, bool is_friend)
set_underlying_type (x);
if (type != error_mark_node
- && TYPE_NAME (type)
&& TYPE_IDENTIFIER (type))
set_identifier_type_value (DECL_NAME (x), x);
@@ -3333,7 +3332,7 @@ do_class_using_decl (tree scope, tree name)
}
/* Using T::T declares inheriting ctors, even if T is a typedef. */
if (MAYBE_CLASS_TYPE_P (scope)
- && ((TYPE_NAME (scope) && name == TYPE_IDENTIFIER (scope))
+ && (name == TYPE_IDENTIFIER (scope)
|| constructor_name_p (name, scope)))
{
maybe_warn_cpp0x (CPP0X_INHERITING_CTORS);