From ec0ca13fc0cbec5984df5836f2c7384daec0bbea Mon Sep 17 00:00:00 2001 From: John McCall Date: Sat, 8 Feb 2014 00:41:16 +0000 Subject: 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 --- lib/CodeGen/CGVTables.cpp | 44 +------------------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) (limited to 'lib/CodeGen/CGVTables.cpp') 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); -- cgit v1.2.3