[clang] [llvm] [WPD]: Apply speculative WPD in non-lto mode. (PR #145031)
Hassnaa Hamdi via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 31 03:05:04 PDT 2025
================
@@ -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
More information about the llvm-commits
mailing list