================
@@ -1216,6 +1228,21 @@ bool CodeGenVTables::isVTableExternal(const
CXXRecordDecl *RD) {
TSK == TSK_ExplicitInstantiationDefinition)
return false;
+ // Itanium C++ ABI [5.2.3]:
+ // Virtual tables for dynamic classes are emitted as follows:
+ //
+ // - If the class is templated, the tables are emitted in every object that
+ // references any of them.
+ // - Otherwise, if the class is attached to a module, the tables are uniquely
+ // emitted in the object for the module unit in which it is defined.
+ // - Otherwise, if the class has a key function (see below), the tables are
+ // emitted in the object for the translation unit containing the definition
of
+ // the key function. This is unique if the key function is not inline.
+ // - Otherwise, the tables are emitted in every object that references any of
+ // them.
----------------
ChuanqiXu9 wrote:
After reviewing this, I decide to only add the second bullet for comment here.
The other three bullets are already mentioned in a different wording and it
looks not appropriate to replace them by the wording from ItaniumCXX ABI Spec.
And if we paste the wording directly, I feel the readability is not good. I
feel it is best to only add the second bullet here now.
https://github.com/llvm/llvm-project/pull/102287
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits