[cfe-commits] r160911 - /cfe/trunk/test/CodeGenCXX/visibility.cpp

Rafael Espindola rafael.espindola at gmail.com
Fri Jul 27 19:51:03 PDT 2012


Author: rafael
Date: Fri Jul 27 21:51:03 2012
New Revision: 160911

URL: http://llvm.org/viewvc/llvm-project?rev=160911&view=rev
Log:
Add a missing testcase for merging the visibility of two declarations used
as arguments of a template.

Modified:
    cfe/trunk/test/CodeGenCXX/visibility.cpp

Modified: cfe/trunk/test/CodeGenCXX/visibility.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/visibility.cpp?rev=160911&r1=160910&r2=160911&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/visibility.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/visibility.cpp Fri Jul 27 21:51:03 2012
@@ -1077,3 +1077,20 @@
   // 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
+  }
+}





More information about the cfe-commits mailing list