[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 6 12:00:46 PDT 2024


================
@@ -1830,6 +1830,9 @@ void ItaniumCXXABI::emitVTableDefinitions(CodeGenVTables &CGVT,
   if (VTable->hasInitializer())
     return;
 
+  if (RD->shouldEmitInExternalSource())
+    return;
----------------
efriedma-quic wrote:

This check seems like it's at the wrong level; if we don't want a vtable, why are we calling this in the first place?

Also, even if the vtable is getting emitted somewhere else, we might want an available_externally vtable.

https://github.com/llvm/llvm-project/pull/75912


More information about the cfe-commits mailing list