Improved handling of the visibility attribute. Declarations now inherit their parent's visibility.

(This is kind of a risky change, but I did a self-host build and everything appears to work fine!)

llvm-svn: 95511
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 644c5d0..c5d84d7 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -132,6 +132,10 @@
     }
   }
 
+  // This decl should have the same visibility as its parent.
+  if (const DeclContext *DC = D->getDeclContext()) 
+    return getDeclVisibilityMode(cast<Decl>(DC));
+
   return getLangOptions().getVisibilityMode();
 }