================
@@ -1483,10 +1483,15 @@ void ASTDeclWriter::VisitCXXRecordDecl(CXXRecordDecl 
*D) {
   if (D->isThisDeclarationADefinition())
     Record.AddCXXDefinitionData(D);
 
-  // Store (what we currently believe to be) the key function to avoid
-  // deserializing every method so we can compute it.
-  if (D->isCompleteDefinition())
-    Record.AddDeclRef(Context.getCurrentKeyFunction(D));
+  if (D->isCompleteDefinition()) {
+    if (D->getOwningModule() && D->getOwningModule()->isInterfaceOrPartition())
+      Writer.ModularCodegenDecls.push_back(Writer.GetDeclRef(D));
+    else {
+      // Store (what we currently believe to be) the key function to avoid
----------------
dwblaikie wrote:

Small/isolated patches help with review, reverting, understanding the code in 
the future etc - please separate things when practical, and this looks like 
such a case.

Changing the ABI is one thing, then optimizing the key function querying for 
un-homed vtables seems like a quite different/separate thing (indeed they 
aren't ordered, even, right? Like either of these changes could be made 
separately and would stand on their own/be beneficial without the other?)

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