Unbreak private_extern, which apparently we had zero tests for.

llvm-svn: 118034
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 2eef54c..ca963ad 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -278,11 +278,12 @@
         LV.mergeVisibility(TypeLV.second);
     }
 
+    if (Var->getStorageClass() == SC_PrivateExtern)
+      LV.setVisibility(HiddenVisibility, true);
+
     if (!Context.getLangOptions().CPlusPlus &&
         (Var->getStorageClass() == SC_Extern ||
          Var->getStorageClass() == SC_PrivateExtern)) {
-      if (Var->getStorageClass() == SC_PrivateExtern)
-        LV.setVisibility(HiddenVisibility, true);
 
       // C99 6.2.2p4:
       //   For an identifier declared with the storage-class specifier
@@ -307,6 +308,9 @@
     // for justification).  In practice, GCC doesn't do this, so it's
     // just too painful to make work.
 
+    if (Function->getStorageClass() == SC_PrivateExtern)
+      LV.setVisibility(HiddenVisibility, true);
+
     // C99 6.2.2p5:
     //   If the declaration of an identifier for a function has no
     //   storage-class specifier, its linkage is determined exactly