[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 7 11:12:38 PDT 2024
================
@@ -1225,13 +1252,7 @@ bool CodeGenVTables::isVTableExternal(const CXXRecordDecl *RD) {
const FunctionDecl *Def;
// Otherwise, if we don't have a definition of the key function, the
// vtable must be defined somewhere else.
- if (!keyFunction->hasBody(Def))
- return true;
-
- assert(Def && "The body of the key function is not assigned to Def?");
- // If the non-inline key function comes from another module unit, the vtable
- // must be defined there.
- return Def->isInAnotherModuleUnit() && !Def->isInlineSpecified();
+ return !keyFunction->hasBody(Def);
----------------
mizvekov wrote:
This reads a bit weird. I'd add a hasBody overload which doesn't take a parameter in this case.
https://github.com/llvm/llvm-project/pull/102287
More information about the cfe-commits
mailing list