[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 7 11:11:40 PDT 2024
================
@@ -1830,6 +1830,9 @@ void ItaniumCXXABI::emitVTableDefinitions(CodeGenVTables &CGVT,
if (VTable->hasInitializer())
return;
+ if (RD->shouldEmitInExternalSource())
+ return;
----------------
dwblaikie wrote:
But this logic (using available externally definitions) is already built into the modules-codegen work (though it's probably only for functions, I guess it might not be in a place general enough to apply to variables as well - if it either can't be generalized in that way, or even if it just isn't suffiicently general now, I agree that it'd be a separate patch, but probably one worth doing) - again, if/where possible, it'd be nice if these things aligned/involved fewer special cases and inconsistencies.
https://github.com/llvm/llvm-project/pull/75912
More information about the cfe-commits
mailing list