[cfe-dev] [llvm-dev] RFC: A new ABI for virtual calls, and a change to the virtual call representation in the IR

Rafael EspĂ­ndola via cfe-dev cfe-dev at lists.llvm.org
Fri Mar 11 11:26:33 PST 2016


> Now, there are a number of things about linkage that are kindof orthogonal,
> and it would be nice to model them more orthogonally.  That would be a major
> change in representation, though.  Absent the will to do that, I propose
> that we:
>   - remove/deprecate protected visibility, making visibility purely a hidden
> vs. non-hidden flag

This would prevent us from propagating
__attribute__((visibility("protected")) to a STV_PROTECTED in the .o,
so I don't think we should do it.

>   - add weak_for_linker, weak_odr_for_linker, linkonce_for_linker, and
> linkonce_odr_for_linker (better names highly desired) to model the
> weak-with-protected-visibility cases
>   - add strong_for_linker (better name highly desired) to model the
> strong-but-interposable case

For representing interposition we would only need one extra linkage
type: interposable (runtime_weak?). We could split the linkage into
multiple orthogonal bits, like: odr, weak_for_linker,
weak_for_runtime, can_be_dropped_if_unused, etc, but I think that is
an independent cleanup

Cheers,
Rafael


More information about the cfe-dev mailing list