diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-23 16:52:48 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-23 16:52:48 +0000 |
commit | 3872a29d5f11eb1bd6f4d16ee78f885660432522 (patch) | |
tree | feb1e76edef896378861b84fbcf2443b81a3873a /gcc/cp/class.c | |
parent | 984149567067a1b448c71f1b0227e8fca6194dc4 (diff) | |
download | gcc-3872a29d5f11eb1bd6f4d16ee78f885660432522.tar.gz |
PR c++/49440
* class.c (set_linkage_according_to_type): Just check TREE_PUBLIC
on the type's name.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175340 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 09444fb49ec..9e387a6923e 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -677,21 +677,10 @@ get_vtable_name (tree type) the abstract. */ void -set_linkage_according_to_type (tree type, tree decl) +set_linkage_according_to_type (tree type ATTRIBUTE_UNUSED, tree decl) { - /* If TYPE involves a local class in a function with internal - linkage, then DECL should have internal linkage too. Other local - classes have no linkage -- but if their containing functions - have external linkage, it makes sense for DECL to have external - linkage too. That will allow template definitions to be merged, - for example. */ - if (no_linkage_check (type, /*relaxed_p=*/true)) - { - TREE_PUBLIC (decl) = 0; - DECL_INTERFACE_KNOWN (decl) = 1; - } - else - TREE_PUBLIC (decl) = 1; + TREE_PUBLIC (decl) = 1; + determine_visibility (decl); } /* Create a VAR_DECL for a primary or secondary vtable for CLASS_TYPE. |