aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-03-18 22:04:43 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-03-18 22:04:43 +0000
commita03849b2e722b9d25eb67a2beb8110c5b2303440 (patch)
tree6e5d52ec57a483bebdffd82b6b3b0324aede69eb /clang/lib/CodeGen/CodeGenModule.cpp
parent2d56abacd1437338fb39226366edd3ecbce9058c (diff)
downloadllvm-a03849b2e722b9d25eb67a2beb8110c5b2303440.zip
llvm-a03849b2e722b9d25eb67a2beb8110c5b2303440.tar.gz
llvm-a03849b2e722b9d25eb67a2beb8110c5b2303440.tar.bz2
MS ABI: Don't try to emit VF/VB-Tables for extern class templates
There will be an explicit template instantiation in another translation unit which will provide the definition of the VF/VB-Tables. This fixes PR22932. llvm-svn: 232680
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index b25f315..8181e68 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1851,7 +1851,8 @@ CodeGenModule::CreateOrReplaceCXXRuntimeVariable(StringRef Name,
OldGV->eraseFromParent();
}
- if (supportsCOMDAT() && GV->isWeakForLinker())
+ if (supportsCOMDAT() && GV->isWeakForLinker() &&
+ !GV->hasAvailableExternallyLinkage())
GV->setComdat(TheModule.getOrInsertComdat(GV->getName()));
return GV;