================
@@ -1802,6 +1802,12 @@ void ItaniumCXXABI::emitVTableDefinitions(CodeGenVTables
&CGVT,
if (VTable->hasInitializer())
return;
+ // If the class is attached to a C++ named module other than the one
+ // we're currently compiling, the vtable should be defined there.
+ if (Module *M = RD->getOwningModule();
+ M && M->isNamedModule() && M != CGM.getContext().getCurrentNamedModule())
----------------
dwblaikie wrote:
Generally we do such cleanup before if there's already at least one use of the
idiom that could be refactored without the patch applied, or in the patch -
rather than after. (sometimes there's a need to do these things after, but this
seems like a fine thing to include in this patch, or
https://github.com/llvm/llvm-project/pull/75912
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits