================ @@ -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:
this idiom is repeated in a few places, and is a bit long-winded. Perhaps it could be made into some common function/shared (if the `hasExternalDefinition` thing can't be made to work more generally) 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