Just disable the hidden-visibility optimization for now by hiding it behind
a -cc1 option.  The Darwin linker complains about mixed visibility when linking
gcc-built objects with clang-built objects, and the optimization isn't really
that valuable.  Platforms with less ornery linkers can feel free to enable this.

llvm-svn: 110979
diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp
index 494176a..22701c2 100644
--- a/clang/lib/CodeGen/CGVTables.cpp
+++ b/clang/lib/CodeGen/CGVTables.cpp
@@ -2465,6 +2465,9 @@
                                const ThunkInfo &Thunk, llvm::Function *Fn) {
   CGM.setGlobalVisibility(Fn, MD);
 
+  if (!CGM.getCodeGenOpts().HiddenWeakVTables)
+    return;
+
   // If the thunk has weak/linkonce linkage, but the function must be
   // emitted in every translation unit that references it, then we can
   // emit its thunks with hidden visibility, since its thunks must be
@@ -2491,7 +2494,7 @@
 
   case TSK_ExplicitSpecialization:
   case TSK_ImplicitInstantiation:
-    if (!CGM.getCodeGenOpts().EmitWeakTemplatesHidden)
+    if (!CGM.getCodeGenOpts().HiddenWeakTemplateVTables)
       return;
     break;
   }