summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-06-10 21:53:06 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-06-10 21:53:06 +0000
commit300f55dcade947fa75ff659e9884b67eb213d9b3 (patch)
tree1200e7437fc101bd5855c65a686f1b8d61712fec /clang/lib/CodeGen/CodeGenModule.cpp
parentc51d334912082759d072a5e8aaed67c18c5bdc76 (diff)
downloadbcm5719-llvm-300f55dcade947fa75ff659e9884b67eb213d9b3.tar.gz
bcm5719-llvm-300f55dcade947fa75ff659e9884b67eb213d9b3.zip
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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index bea70ea38f3..7a1a968259f 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud