aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGVTables.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-12 23:36:15 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-12 23:36:15 +0000
commit279b5eb6910d64a293e9c0e2887a05c65d8737d7 (patch)
tree5537a0f31a4265fc8167a0c7dd6868338f1d2b0a /lib/CodeGen/CGVTables.cpp
parentf18d0d8b39e891460d50f8a8b85029885b264986 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110979 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVTables.cpp')
-rw-r--r--lib/CodeGen/CGVTables.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/CGVTables.cpp b/lib/CodeGen/CGVTables.cpp
index 494176a906..22701c2f69 100644
--- a/lib/CodeGen/CGVTables.cpp
+++ b/lib/CodeGen/CGVTables.cpp
@@ -2465,6 +2465,9 @@ static void setThunkVisibility(CodeGenModule &CGM, const CXXMethodDecl *MD,
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 @@ static void setThunkVisibility(CodeGenModule &CGM, const CXXMethodDecl *MD,
case TSK_ExplicitSpecialization:
case TSK_ImplicitInstantiation:
- if (!CGM.getCodeGenOpts().EmitWeakTemplatesHidden)
+ if (!CGM.getCodeGenOpts().HiddenWeakTemplateVTables)
return;
break;
}