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

Rafael Espindola rafael.espindola at gmail.com
Mon Apr 23 07:02:53 PDT 2012


Author: rafael
Date: Mon Apr 23 09:02:53 2012
New Revision: 155351

URL: http://llvm.org/viewvc/llvm-project?rev=155351&view=rev
Log:
Add another testcase that was not being covered.

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=155351&r1=155350&r2=155351&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/visibility.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/visibility.cpp Mon Apr 23 09:02:53 2012
@@ -682,3 +682,21 @@
   // CHECK: define weak_odr void @_ZN6test343barINS_3fooEEEvv
   // CHECK-HIDDEN: define weak_odr void @_ZN6test343barINS_3fooEEEvv
 }
+
+namespace test35 {
+  // This is a really ugly testcase. GCC propagates the DEFAULT in zed's
+  // definition. What we do instead is be conservative about merging
+  // implicit visibilities.
+  // FIXME: Maybe the best thing to do here is error? The test at least
+  // makes sure we don't produce a hidden symbol for foo<zed>::bar.
+  template<typename T>
+  struct DEFAULT foo {
+    void bar() {}
+  };
+  class zed;
+  template class foo<zed>;
+  class DEFAULT zed {
+  };
+  // CHECK: define weak_odr void @_ZN6test353fooINS_3zedEE3barEv
+  // CHECK-HIDDEN: define weak_odr void @_ZN6test353fooINS_3zedEE3barEv
+}





More information about the cfe-commits mailing list