aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/visibility.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2013-02-20 01:54:26 +0000
committerJohn McCall <rjmccall@apple.com>2013-02-20 01:54:26 +0000
commitd4c3d66be70ae2d0bd828329022dc428cc277a1c (patch)
treeb980077d0866c29bcf09476b73c6a1d234727872 /test/CodeGenCXX/visibility.cpp
parent975d52c759a0da21461668bac840bb5d21061d1b (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175587 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/visibility.cpp')
-rw-r--r--test/CodeGenCXX/visibility.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGenCXX/visibility.cpp b/test/CodeGenCXX/visibility.cpp
index 5564dc4019..cfddc8c0c2 100644
--- a/test/CodeGenCXX/visibility.cpp
+++ b/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()
+}