[cfe-commits] r155100 - /cfe/trunk/lib/AST/Decl.cpp
Rafael Espindola
rafael.espindola at gmail.com
Wed Apr 18 21:37:17 PDT 2012
Author: rafael
Date: Wed Apr 18 23:37:16 2012
New Revision: 155100
URL: http://llvm.org/viewvc/llvm-project?rev=155100&view=rev
Log:
Check ConsiderGlobalVisibility before using -fvisibility.
Modified:
cfe/trunk/lib/AST/Decl.cpp
Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=155100&r1=155099&r2=155100&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Wed Apr 18 23:37:16 2012
@@ -291,7 +291,8 @@
}
}
- LV.mergeVisibility(Context.getLangOpts().getVisibilityMode());
+ if (F.ConsiderGlobalVisibility)
+ LV.mergeVisibility(Context.getLangOpts().getVisibilityMode());
// C++ [basic.link]p4:
@@ -532,7 +533,8 @@
if (LV.linkage() == UniqueExternalLinkage)
return LinkageInfo::uniqueExternal();
- LV.mergeVisibility(D->getASTContext().getLangOpts().getVisibilityMode());
+ if (F.ConsiderGlobalVisibility)
+ LV.mergeVisibility(D->getASTContext().getLangOpts().getVisibilityMode());
if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D)) {
// If the type of the function uses a type with unique-external
More information about the cfe-commits
mailing list