================
@@ -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();
+
----------------
dwblaikie wrote:

Why is this needed? Why doesn't it fall out of the condition above that covers 
`hasExternalDefinitions`?

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

Reply via email to