[clang] [CodeGen] Mark weak vtables unnamed_addr on duplicable-vtable targets (PR #205930)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 30 19:03:09 PDT 2026
ChuanqiXu9 wrote:
> > I didn't thought the linkage of vtable is related to targets.
> > > On Mach-O, a weak vtable that is unnamed_addr lowers to a .weak_def_can_be_hidden definition
> >
> >
> > Is this only possible on Mach-O? I mean, if this is an optimization, why didn't it work on other platforms?
>
> It may be a matter of other platforms not having got around to it, or platform constraints make it less viable/valuable? It probably benefits platforms where mapped system libraries can be aggressively shared across many processes, but I'm not a linker person if I can help it.
I still don't understand why this is platform specific... Or what is the bad side of the behavior?
https://github.com/llvm/llvm-project/pull/205930
More information about the cfe-commits
mailing list