[clang] [clang][RelativeVTables] Make the rtti_proxy LinkOnceODR instead of External linkage (PR #67755)

Petr Hosek via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 3 16:13:07 PDT 2023


================
@@ -639,8 +639,16 @@ void CodeGenVTables::addRelativeComponent(ConstantArrayBuilder &builder,
   // want the stub/proxy to be emitted for properly calculating the offset.
   // Examples where there would be no symbol emitted are available_externally
   // and private linkages.
-  auto stubLinkage = vtableHasLocalLinkage ? llvm::GlobalValue::InternalLinkage
-                                           : llvm::GlobalValue::ExternalLinkage;
+  //
+  // `internal` linkage results in LOCAL Elf linkage while still manifesting a
----------------
petrhosek wrote:

This is just a nit, but ELF is usually spelled in all caps since it's an acronym. I'd also use `STB_LOCAL` rather than `LOCAL` to be more explicit and use "binding" rather than "linkage".

https://github.com/llvm/llvm-project/pull/67755


More information about the cfe-commits mailing list