diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-03-18 22:04:43 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-03-18 22:04:43 +0000 |
commit | a03849b2e722b9d25eb67a2beb8110c5b2303440 (patch) | |
tree | 6e5d52ec57a483bebdffd82b6b3b0324aede69eb /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 2d56abacd1437338fb39226366edd3ecbce9058c (diff) | |
download | llvm-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.cpp | 3 |
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; |