[cfe-dev] [llvm-dev] RFC: A new ABI for virtual calls, and a change to the virtual call representation in the IR
Peter Collingbourne via cfe-dev
cfe-dev at lists.llvm.org
Fri Mar 11 11:04:11 PST 2016
On Fri, Mar 11, 2016 at 9:56 AM, Reid Kleckner <rnk at google.com> wrote:
> On Fri, Mar 11, 2016 at 9:41 AM, John McCall <rjmccall at apple.com> wrote:
>> Okay, so, it sounds to me like LLVM basically treats strong definitions
>> as protected, then. Should we just formalize that?
>> I guess the proposal here would be:
>> 1. Remove protected visibility from LLVM. (Or deprecate it as
>> equivalent to default.)
>> 2. Teach the ELF emitter to emit non-hidden strong definitions using
>> ELF protected visibility.
>> 3. Teach the ELF emitter to emit non-hidden weak definitions using ELF
>> default visibility (unless they’re unnamed_addr?).
> LLVM definitely thinks that strong definitions are "ODR", so we could do
> 2. I'm sure it would break somebody, somewhere though. We probably don't
> want to do 1 and 3, so that users can still mark their weak definitions as
> protected if they want to.
Yes, but what I think John was getting at with 3 could work (modulo
possible breakage, as you mention): "Teach the ELF emitter to emit
non-hidden weak unnamed_addr definitions using ELF protected visibility".
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev