Consider visibility attributes in namespaces as being explicit. I.e., they
take precedence over command line options. Fixes PR10113.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147405 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/visibility.cpp b/test/CodeGenCXX/visibility.cpp
index 0da55c6..ce1e8fd 100644
--- a/test/CodeGenCXX/visibility.cpp
+++ b/test/CodeGenCXX/visibility.cpp
@@ -454,3 +454,15 @@
   // CHECK-HIDDEN: declare void @_ZN6test221BINS_2A2EE3fooEv()
   // CHECK-HIDDEN: define linkonce_odr hidden void @_ZN6test221BINS_2A2EE3barEv()
 }
+
+namespace PR10113 {
+  namespace foo __attribute__ ((__visibility__ ("default"))) {
+    template<typename T>
+      class bar {
+      void zed() {}
+    };
+  }
+  template class foo::bar<char>;
+  // CHECK: define weak_odr void @_ZN7PR101133foo3barIcE3zedEv
+  // CHECK-HIDDEN: define weak_odr void @_ZN7PR101133foo3barIcE3zedEv
+}