diff options
author | John McCall <rjmccall@apple.com> | 2013-02-20 01:54:26 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2013-02-20 01:54:26 +0000 |
commit | d041a9bf2d99efe9ae4068eff98f5f5066cb717f (patch) | |
tree | ab93ddc82b9ca25b0631ca9c15e6253bc38227c3 /clang/test/CodeGenCXX/visibility.cpp | |
parent | 98155ad3b55b9dd5e3c03949d852fb6b189394d7 (diff) | |
download | bcm5719-llvm-d041a9bf2d99efe9ae4068eff98f5f5066cb717f.tar.gz bcm5719-llvm-d041a9bf2d99efe9ae4068eff98f5f5066cb717f.zip |
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
Diffstat (limited to 'clang/test/CodeGenCXX/visibility.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/visibility.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/visibility.cpp b/clang/test/CodeGenCXX/visibility.cpp index 5564dc40195..cfddc8c0c29 100644 --- a/clang/test/CodeGenCXX/visibility.cpp +++ b/clang/test/CodeGenCXX/visibility.cpp @@ -1170,3 +1170,15 @@ namespace test63 { // CHECK: define linkonce_odr hidden void @_ZN6test631A3fooILNS_1EE0EEEvv() // CHECK: define linkonce_odr hidden void @_ZN6test631A1BILNS_1EE0EE3fooEv() } + +// Don't ignore the visibility of template arguments just because we +// explicitly instantiated something. +namespace test64 { + struct HIDDEN A {}; + template <class P> struct B { + static DEFAULT void foo() {} + }; + + template class B<A>; + // CHECK: define weak_odr hidden void @_ZN6test641BINS_1AEE3fooEv() +} |