diff options
| author | John McCall <rjmccall@apple.com> | 2014-02-08 00:41:16 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2014-02-08 00:41:16 +0000 |
| commit | ec0ca13fc0cbec5984df5836f2c7384daec0bbea (patch) | |
| tree | 61102fcda024a232a3eff461cc6558086457772b /lib/CodeGen/CGVTables.cpp | |
| parent | b7f8c7a32c4b630a4f7fe73a5418b30831651323 (diff) | |
| download | clang-ec0ca13fc0cbec5984df5836f2c7384daec0bbea.tar.gz clang-ec0ca13fc0cbec5984df5836f2c7384daec0bbea.tar.bz2 clang-ec0ca13fc0cbec5984df5836f2c7384daec0bbea.tar.xz | |
Remove the -fhidden-weak-vtables -cc1 option. It was dead,
gross, and increasingly replaced through other mechanisms.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201011 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVTables.cpp')
| -rw-r--r-- | lib/CodeGen/CGVTables.cpp | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/lib/CodeGen/CGVTables.cpp b/lib/CodeGen/CGVTables.cpp index 35f3421fa5..4a381a8d48 100644 --- a/lib/CodeGen/CGVTables.cpp +++ b/lib/CodeGen/CGVTables.cpp @@ -54,48 +54,6 @@ llvm::Constant *CodeGenModule::GetAddrOfThunk(GlobalDecl GD, 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 - // emitted when the function is. - - // This follows CodeGenModule::setTypeVisibility; see the comments - // there for explanation. - - if ((Fn->getLinkage() != llvm::GlobalVariable::LinkOnceODRLinkage && - Fn->getLinkage() != llvm::GlobalVariable::WeakODRLinkage) || - Fn->getVisibility() != llvm::GlobalVariable::DefaultVisibility) - return; - - if (MD->getExplicitVisibility(ValueDecl::VisibilityForValue)) - return; - - switch (MD->getTemplateSpecializationKind()) { - case TSK_ExplicitInstantiationDefinition: - case TSK_ExplicitInstantiationDeclaration: - return; - - case TSK_Undeclared: - break; - - case TSK_ExplicitSpecialization: - case TSK_ImplicitInstantiation: - return; - break; - } - - // If there's an explicit definition, and that definition is - // out-of-line, then we can't assume that all users will have a - // definition to emit. - const FunctionDecl *Def = 0; - if (MD->hasBody(Def) && Def->isOutOfLine()) - return; - - Fn->setVisibility(llvm::GlobalValue::HiddenVisibility); } #ifndef NDEBUG @@ -626,7 +584,7 @@ CodeGenVTables::GenerateConstructionVTable(const CXXRecordDecl *RD, // Create the variable that will hold the construction vtable. llvm::GlobalVariable *VTable = CGM.CreateOrReplaceCXXRuntimeVariable(Name, ArrayType, Linkage); - CGM.setTypeVisibility(VTable, RD, CodeGenModule::TVK_ForConstructionVTable); + CGM.setGlobalVisibility(VTable, RD); // V-tables are always unnamed_addr. VTable->setUnnamedAddr(true); |
