[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 5 23:05:00 PDT 2024
================
@@ -3239,6 +3239,12 @@ bool ASTReader::isConsumerInterestedIn(Decl *D) {
if (ES->hasExternalDefinitions(D) == ExternalASTSource::EK_Never)
return true;
+ // The dynamic class defined in a named module is interesting.
+ // The code generator needs to emit its vtable there.
+ if (const auto *Class = dyn_cast<CXXRecordDecl>(D))
+ return Class->isInCurrentModuleUnit() &&
+ Class->getDefinition() && Class->isDynamicClass();
+
----------------
ChuanqiXu9 wrote:
On, nice catch. I didn't notice this. I've removed it.
https://github.com/llvm/llvm-project/pull/75912
More information about the cfe-commits
mailing list