summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/MicrosoftCXXABI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/MicrosoftCXXABI.cpp')
-rw-r--r--clang/lib/CodeGen/MicrosoftCXXABI.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
index 1402b5263b6..c7e66e9465f 100644
--- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp
+++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
@@ -1420,6 +1420,10 @@ llvm::GlobalVariable *MicrosoftCXXABI::getAddrOfVTable(const CXXRecordDecl *RD,
} else {
llvm_unreachable("unexpected linkage for vftable!");
}
+ } else {
+ if (llvm::GlobalValue::isWeakForLinker(VFTableLinkage))
+ VTable->setComdat(
+ CGM.getModule().getOrInsertComdat(VTable->getName()));
}
VFTable->setLinkage(VFTableLinkage);
CGM.setGlobalVisibility(VFTable, RD);
OpenPOWER on IntegriCloud