================
@@ -1359,7 +1359,8 @@ void CodeGenModule::EmitVTableTypeMetadata(const 
CXXRecordDecl *RD,
   // Emit type metadata on vtables with LTO or IR instrumentation.
   // In IR instrumentation, the type metadata is used to find out vtable
   // definitions (for type profiling) among all global variables.
-  if (!getCodeGenOpts().LTOUnit && !getCodeGenOpts().hasProfileIRInstr())
+  if (!getCodeGenOpts().LTOUnit && !getCodeGenOpts().hasProfileIRInstr() &&
+      !getCodeGenOpts().WholeProgramVTables)
----------------
hassnaaHamdi wrote:

Hi Teresa, thanks for the review.
Sorry about late reply, I was on holiday.

Without checking `WholeProgramVTables`, the needed metadata will not be emitted.

https://github.com/llvm/llvm-project/pull/145031
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to