diff options
author | Julian Brown <julian@codesourcery.com> | 2008-07-17 14:03:50 +0000 |
---|---|---|
committer | Julian Brown <jules@gcc.gnu.org> | 2008-07-17 14:03:50 +0000 |
commit | 711b299844b8eb77451d96a360f4525fc005279e (patch) | |
tree | 227fab594ab803abac56d2e5bd12c689005f8eac /gcc/cp/decl2.c | |
parent | 0eae6babe5d9101e825cb8f32bba494642db45af (diff) | |
download | gcc-711b299844b8eb77451d96a360f4525fc005279e.zip gcc-711b299844b8eb77451d96a360f4525fc005279e.tar.gz gcc-711b299844b8eb77451d96a360f4525fc005279e.tar.bz2 |
decl2.c (determine_visibility): Allow target to override visibility of class data.
gcc/cp/
* decl2.c (determine_visibility): Allow target to override
visibility of class data.
gcc/
* config/arm/arm.c (arm_cxx_determine_class_data_visibility): Make
no-op for targets which don't use DLLs.
gcc/testsuite/
* g++.dg/ext/visibility/arm3.C: Add explanatory text. Skip on
non-DLL targets.
* g++.dg/ext/visibility/arm1.C: Skip on non-DLL targets.
Co-Authored-By: Mark Mitchell <mark@codesourcery.com>
From-SVN: r137922
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index a5ece9a..f14f94d 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1963,6 +1963,14 @@ determine_visibility (tree decl) /* tinfo visibility is based on the type it's for. */ constrain_visibility (decl, type_visibility (TREE_TYPE (DECL_NAME (decl)))); + + /* Give the target a chance to override the visibility associated + with DECL. */ + if (TREE_PUBLIC (decl) + && !DECL_REALLY_EXTERN (decl) + && CLASS_TYPE_P (TREE_TYPE (DECL_NAME (decl))) + && !CLASSTYPE_VISIBILITY_SPECIFIED (TREE_TYPE (DECL_NAME (decl)))) + targetm.cxx.determine_class_data_visibility (decl); } else if (use_template) /* Template instantiations and specializations get visibility based |