[PATCH] D96919: [clang] Emit type metadata on available_externally vtables for WPD

Teresa Johnson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 19 11:19:21 PST 2021


tejohnson added inline comments.


================
Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:1781
+    // analysis.
+    if (VTable->isDeclarationForLinker())
+      CGM.addCompilerUsedGlobal(VTable);
----------------
davidxl wrote:
> Is it better to guard it with with if (CGM.getCodeGenOpts().WholeProgramVTables)  which seems clearer in intention?
No I don't think we want to do this, it would mean every single vtable would be put on the llvm.compiler.used which is unnecessary. The available_externally are the ones that aren't sticking around otherwise.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96919/new/

https://reviews.llvm.org/D96919



More information about the cfe-commits mailing list