aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2015-04-15 17:17:15 -0400
committerJason Merrill <jason@gcc.gnu.org>2015-04-15 17:17:15 -0400
commitbf5730d773ea9e7735a997c1fe474f1706a614c5 (patch)
treeab7569be78efce0c25ee12027475657d84325d06 /gcc
parent5ce3039eb1e5771e01ee9513f0b7508a95f544ed (diff)
downloadgcc-bf5730d773ea9e7735a997c1fe474f1706a614c5.zip
gcc-bf5730d773ea9e7735a997c1fe474f1706a614c5.tar.gz
gcc-bf5730d773ea9e7735a997c1fe474f1706a614c5.tar.bz2
* decl2.c (determine_visibility): Use get_template_info.
From-SVN: r222133
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/decl2.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3534fdb..519fc81 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,4 +1,8 @@
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>
PR c++/65727
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 989a030..5a58d33 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -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))