PR10120: Make CodeGenModule::getVTableLinkage use NamedDecl::getLinkage to determine whether the vtable should be externally visible, instead of a rough approximation of it which messes up with templates.
While I'm here, zap the other user of isInAnonymousNamespace outside of Decl.cpp. llvm-svn: 132861
This commit is contained in:
@@ -1125,7 +1125,7 @@ void CodeGenModule::EmitVTable(CXXRecordDecl *Class, bool DefinitionRequired) {
|
||||
|
||||
llvm::GlobalVariable::LinkageTypes
|
||||
CodeGenModule::getVTableLinkage(const CXXRecordDecl *RD) {
|
||||
if (RD->isInAnonymousNamespace() || !RD->hasLinkage())
|
||||
if (RD->getLinkage() != ExternalLinkage)
|
||||
return llvm::GlobalVariable::InternalLinkage;
|
||||
|
||||
if (const CXXMethodDecl *KeyFunction
|
||||
|
||||
Reference in New Issue
Block a user