It turns out that linkers (at least, the Darwin linker) don't necessarily
do the right thing with mixed-visibility symbols, so disable the visibility
optimization where that's possible, i.e. with template classes (since it's
possible that an arbitrary template might be subject to an explicit
instantiation elsewhere).  447.dealII actually does this.

I've put the code under an option that's currently not hooked up to anything.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110374 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/vtable-linkage.cpp b/test/CodeGenCXX/vtable-linkage.cpp
index 67980ed..6c1301b 100644
--- a/test/CodeGenCXX/vtable-linkage.cpp
+++ b/test/CodeGenCXX/vtable-linkage.cpp
@@ -137,10 +137,10 @@
 // CHECK-7: @_ZTI1EIlE = weak_odr constant
 
 // F<long> is an implicit template instantiation with no key function,
-// so its vtable should have weak_odr linkage and hidden visibility.
-// CHECK-8: @_ZTV1FIlE = weak_odr hidden constant
+// so its vtable should have weak_odr linkage.
+// CHECK-8: @_ZTV1FIlE = weak_odr constant
 // CHECK-8: @_ZTS1FIlE = weak_odr constant
-// CHECK-8: @_ZTI1FIlE = weak_odr hidden constant
+// CHECK-8: @_ZTI1FIlE = weak_odr constant
 
 // F<int> is an explicit template instantiation declaration without a
 // key function, so its vtable should have external linkage.
@@ -164,10 +164,10 @@
 // CHECK-12: @_ZTIN12_GLOBAL__N_11AE = internal constant
 
 // F<char> is an explicit specialization without a key function, so
-// its vtable should have weak_odr linkage and hidden visibility.
-// CHECK-13: @_ZTV1FIcE = weak_odr hidden constant
+// its vtable should have weak_odr linkage.
+// CHECK-13: @_ZTV1FIcE = weak_odr constant
 // CHECK-13: @_ZTS1FIcE = weak_odr constant
-// CHECK-13: @_ZTI1FIcE = weak_odr hidden constant
+// CHECK-13: @_ZTI1FIcE = weak_odr constant
 
 // RUN: FileCheck --check-prefix=CHECK-G %s < %t
 //