diff options
author | John McCall <rjmccall@apple.com> | 2010-08-12 23:36:15 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-12 23:36:15 +0000 |
commit | 279b5eb6910d64a293e9c0e2887a05c65d8737d7 (patch) | |
tree | 5537a0f31a4265fc8167a0c7dd6868338f1d2b0a /lib/CodeGen/CodeGenModule.cpp | |
parent | f18d0d8b39e891460d50f8a8b85029885b264986 (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/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 6283b744c3..1715042691 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -225,6 +225,9 @@ void CodeGenModule::setTypeVisibility(llvm::GlobalValue *GV, bool IsForRTTI) const { setGlobalVisibility(GV, RD); + if (!CodeGenOpts.HiddenWeakVTables) + return; + // We want to drop the visibility to hidden for weak type symbols. // This isn't possible if there might be unresolved references // elsewhere that rely on this symbol being visible. @@ -260,7 +263,7 @@ void CodeGenModule::setTypeVisibility(llvm::GlobalValue *GV, // to deal with mixed-visibility symbols. case TSK_ExplicitSpecialization: case TSK_ImplicitInstantiation: - if (!CodeGenOpts.EmitWeakTemplatesHidden) + if (!CodeGenOpts.HiddenWeakTemplateVTables) return; break; } |