[cfe-commits] r69025 - /cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Chris Lattner sabre at nondot.org
Mon Apr 13 22:27:14 PDT 2009


Author: lattner
Date: Tue Apr 14 00:27:13 2009
New Revision: 69025

URL: http://llvm.org/viewvc/llvm-project?rev=69025&view=rev
Log:
do not set visibility on "private" or "available externally" linkage objects.

Modified:
    cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=69025&r1=69024&r2=69025&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Tue Apr 14 00:27:13 2009
@@ -100,7 +100,7 @@
 static void setGlobalVisibility(llvm::GlobalValue *GV,
                                 VisibilityAttr::VisibilityTypes Vis) {
   // Internal definitions should always have default visibility.
-  if (GV->hasInternalLinkage()) {
+  if (GV->hasLocalLinkage()) {
     GV->setVisibility(llvm::GlobalValue::DefaultVisibility);
     return;
   }
@@ -122,7 +122,7 @@
 static void setGlobalOptionVisibility(llvm::GlobalValue *GV,
                                       LangOptions::VisibilityMode Vis) {
   // Internal definitions should always have default visibility.
-  if (GV->hasInternalLinkage()) {
+  if (GV->hasLocalLinkage()) {
     GV->setVisibility(llvm::GlobalValue::DefaultVisibility);
     return;
   }





More information about the cfe-commits mailing list