From cb5d2d0647fdab2e36c85b417e03bf18916ce10c Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Fri, 10 Jun 2011 21:53:06 +0000 Subject: 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132861 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/CodeGenModule.cpp') diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index bea70ea38f..7a1a968259 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -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 -- cgit v1.2.3-18-g5258