* decl2.c (determine_visibility): Use get_template_info.
authorJason Merrill <jason@redhat.com>
Wed, 15 Apr 2015 21:17:15 +0000 (17:17 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 15 Apr 2015 21:17:15 +0000 (17:17 -0400)
From-SVN: r222133

gcc/cp/ChangeLog
gcc/cp/decl2.c

index 3534fdb8b2d8456487dde7eafcb11e584a33cf1b..519fc81f812d36253eb3b7b4536a25a441f8d4c8 100644 (file)
@@ -1,3 +1,7 @@
+2015-04-15  Jason Merrill  <jason@redhat.com>
+
+       * decl2.c (determine_visibility): Use get_template_info.
+
 2015-04-15  Jason Merrill  <jason@redhat.com>
            Marek Polacek  <polacek@redhat.com>
 
index 989a0303babc785c3e9748124b797502a7701704..5a58d3391c8634f2d4a8bae4575d7d6c0384b2f1 100644 (file)
@@ -2386,9 +2386,7 @@ determine_visibility (tree decl)
     {
       /* If the specialization doesn't specify visibility, use the
         visibility from the template.  */
-      tree tinfo = (TREE_CODE (decl) == TYPE_DECL
-                   ? TYPE_TEMPLATE_INFO (TREE_TYPE (decl))
-                   : DECL_TEMPLATE_INFO (decl));
+      tree tinfo = get_template_info (decl);
       tree args = TI_ARGS (tinfo);
       tree attribs = (TREE_CODE (decl) == TYPE_DECL
                      ? TYPE_ATTRIBUTES (TREE_TYPE (decl))