Add a new 'type_visibility' attribute to allow users to

control the visibility of a type for the purposes of RTTI
and template argument restrictions independently of how
visibility propagates to its non-type member declarations.

Also fix r175326 to not ignore template argument visibility
on a template explicit instantiation when a member has
an explicit attribute but the instantiation does not.

The type_visibility work is rdar://11880378

llvm-svn: 175587
This commit is contained in:
John McCall
2013-02-20 01:54:26 +00:00
parent 98155ad3b5
commit d041a9bf2d
13 changed files with 443 additions and 93 deletions

View File

@@ -347,7 +347,7 @@ void CodeGenModule::setTypeVisibility(llvm::GlobalValue *GV,
return;
// Don't override an explicit visibility attribute.
if (RD->getExplicitVisibility())
if (RD->getExplicitVisibility(NamedDecl::VisibilityForType))
return;
switch (RD->getTemplateSpecializationKind()) {