]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
decl.c (duplicate_decls, [...]): Use TYPE_IDENTIFIER.
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 30 Jan 2014 14:26:51 +0000 (14:26 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 30 Jan 2014 14:26:51 +0000 (14:26 +0000)
2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>

* decl.c (duplicate_decls, typename_hash, typename_compare):
Use TYPE_IDENTIFIER.
* error.c (dump_type): Likewise.
* mangle.c (dump_substitution_candidates): Likewise.

From-SVN: r207303

gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/error.c
gcc/cp/mangle.c

index 037b4bd8c409f4f27b1c62f0eefa6f7fd102ae11..7f9112826262813e8c4b60282211b26aa72cb1a0 100644 (file)
@@ -1,3 +1,10 @@
+2014-01-30  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * decl.c (duplicate_decls, typename_hash, typename_compare):
+       Use TYPE_IDENTIFIER.
+       * error.c (dump_type): Likewise.
+       * mangle.c (dump_substitution_candidates): Likewise.
+
 2014-01-30  Jason Merrill  <jason@redhat.com>
 
        PR c++/59633
index 3652e8dd11ab16ce7ae1ddcdaa10d4c91a2c7d2f..b7d2d9f502de46138c23908471bde4647564ff5d 100644 (file)
@@ -1381,7 +1381,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
 
                    if (TYPE_PTR_P (t)
                        && TYPE_NAME (TREE_TYPE (t))
-                       && DECL_NAME (TYPE_NAME (TREE_TYPE (t)))
+                       && TYPE_IDENTIFIER (TREE_TYPE (t))
                           == get_identifier ("FILE")
                        && compparms (TREE_CHAIN (t1), TREE_CHAIN (t2)))
                      {
@@ -3213,7 +3213,7 @@ typename_hash (const void* k)
   const_tree const t = (const_tree) k;
 
   hash = (htab_hash_pointer (TYPE_CONTEXT (t))
-         ^ htab_hash_pointer (DECL_NAME (TYPE_NAME (t))));
+         ^ htab_hash_pointer (TYPE_IDENTIFIER (t)));
 
   return hash;
 }
@@ -3235,7 +3235,7 @@ typename_compare (const void * k1, const void * k2)
   const_tree const t1 = (const_tree) k1;
   const typename_info *const t2 = (const typename_info *) k2;
 
-  return (DECL_NAME (TYPE_NAME (t1)) == t2->name
+  return (TYPE_IDENTIFIER (t1) == t2->name
          && TYPE_CONTEXT (t1) == t2->scope
          && TYPENAME_TYPE_FULLNAME (t1) == t2->template_id
          && TYPENAME_IS_ENUM_P (t1) == t2->enum_p
index 35c94f25522d976efc8f13ee5ebdaaf7c91f4dbd..050791cbdb1a8336a6f9c1590fca1550f9b97212 100644 (file)
@@ -512,7 +512,7 @@ dump_type (cxx_pretty_printer *pp, tree t, int flags)
          pp_cxx_colon_colon (pp);
        }
       pp_cxx_ws_string (pp, "template");
-      dump_type (pp, DECL_NAME (TYPE_NAME (t)), flags);
+      dump_type (pp, TYPE_IDENTIFIER (t), flags);
       break;
 
     case TYPEOF_TYPE:
index add73cf30c1f5fe2d89e57a8b1477e807cade5a4..7bb6f4b0199c2254be60035e9d270c4550c02b7e 100644 (file)
@@ -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 (DECL_NAME (TYPE_NAME (el)));
+       name = IDENTIFIER_POINTER (TYPE_IDENTIFIER (el));
       fprintf (stderr, " S%d_ = ", i - 1);
       if (TYPE_P (el) &&
          (CP_TYPE_RESTRICT_P (el)