diff options
author | Jason Merrill <jason@redhat.com> | 2015-04-15 17:17:15 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2015-04-15 17:17:15 -0400 |
commit | bf5730d773ea9e7735a997c1fe474f1706a614c5 (patch) | |
tree | ab7569be78efce0c25ee12027475657d84325d06 /gcc | |
parent | 5ce3039eb1e5771e01ee9513f0b7508a95f544ed (diff) | |
download | gcc-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/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 4 |
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)) |