aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-07-28 02:51:03 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-07-28 02:51:03 +0000
commit6d4a40edb5854d4723e7d25b0e908310b54cc6a0 (patch)
treeda0abc482ffa56633b4c478df264d2280751fca6
parent72b57cc4463315ed1446aeca476e08f68e4679da (diff)
Add a missing testcase for merging the visibility of two declarations used
as arguments of a template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160911 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGenCXX/visibility.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGenCXX/visibility.cpp b/test/CodeGenCXX/visibility.cpp
index 590c06e4d0..d2f58f968d 100644
--- a/test/CodeGenCXX/visibility.cpp
+++ b/test/CodeGenCXX/visibility.cpp
@@ -1077,3 +1077,20 @@ namespace test58 {
// CHECK: define linkonce_odr hidden void @_ZN6test583barINS_3fooEE3zedEv
// CHECK-HIDDEN: define linkonce_odr hidden void @_ZN6test583barINS_3fooEE3zedEv
}
+
+namespace test59 {
+ DEFAULT int f();
+ HIDDEN int g();
+ typedef int (*foo)();
+ template<foo x, foo y>
+ void test() {}
+ void use() {
+ test<&g, &f>();
+ // CHECK: define linkonce_odr hidden void @_ZN6test594testIXadL_ZNS_1gEvEEXadL_ZNS_1fEvEEEEvv
+ // CHECK-HIDDEN: define linkonce_odr hidden void @_ZN6test594testIXadL_ZNS_1gEvEEXadL_ZNS_1fEvEEEEvv
+
+ test<&f, &g>();
+ // CHECK: define linkonce_odr hidden void @_ZN6test594testIXadL_ZNS_1fEvEEXadL_ZNS_1gEvEEEEvv
+ // CHECK-HIDDEN: define linkonce_odr hidden void @_ZN6test594testIXadL_ZNS_1fEvEEXadL_ZNS_1gEvEEEEvv
+ }
+}