[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 7 20:15:15 PDT 2024
================
@@ -1081,29 +1081,41 @@ llvm::GlobalVariable::LinkageTypes
CodeGenModule::getVTableLinkage(const CXXRecordDecl *RD) {
if (!RD->isExternallyVisible())
return llvm::GlobalVariable::InternalLinkage;
-
- // We're at the end of the translation unit, so the current key
- // function is fully correct.
- const CXXMethodDecl *keyFunction = Context.getCurrentKeyFunction(RD);
- if (keyFunction && !RD->hasAttr<DLLImportAttr>()) {
+
+ // In windows, the linkage of vtable is not related to modules.
+ bool IsInNamedModule = !getTarget().getCXXABI().isMicrosoft() &&
+ RD->isInNamedModule();
+ // If the CXXRecordDecl are not in a module unit, we need to get
----------------
ChuanqiXu9 wrote:
Done
https://github.com/llvm/llvm-project/pull/102287
More information about the cfe-commits
mailing list