Produce direct calls instead of alias to linkonce_odr functions
Rafael EspĂndola
rafael.espindola at gmail.com
Mon Nov 4 14:21:43 PST 2013
On 4 November 2013 12:21, Richard Smith <richard at metafoo.co.uk> wrote:
> I'm a bit confused by this. We seem to stop emitting some weak_odr symbols
> with this patch. Are those symbols not required by the ABI? (If not, why
> were they weak_odr and not linkonce_odr?)
They were weak_odr aliases to linkonce_odr symbols. They were there as
a workaround for us not having comdat support directly in LLVM IR.
Given how comdat work, every translation unit has to make the same
decisions as to what gets put in a comdat. Since we implement weak
symbols with comdats, the alias to them cannot be linkonce, otherwise
one TU could have both symbols and another just one.
So a way to look at this patch is that it avoid the need for that
workaround by not emitting aliases in that case.
Cheers,
Rafael
More information about the cfe-commits
mailing list