================ @@ -1046,6 +1046,15 @@ CodeGenModule::getVTableLinkage(const CXXRecordDecl *RD) { if (!RD->isExternallyVisible()) return llvm::GlobalVariable::InternalLinkage; + // Previously we'll decide the linkage of the vtable by the linkage + // of the key function. But within modules, the concept of key functions + // becomes meaningless. So the linkage of the vtable should always be + // external if the class is externally visible. + // + // TODO: How about the case of AppleKext, DLLExportAttr and DLLImportAttr. ---------------- ChuanqiXu9 wrote:
I've updated the comments. And I'd like to leave the simplification to later patches. https://github.com/llvm/llvm-project/pull/75912 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits