r194288 - If a linkonce_odr dtor/ctor is identical to another one, just rauw.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Nov 11 20:42:35 PST 2013


On 11 November 2013 23:35, David Blaikie <dblaikie at gmail.com> wrote:
> This optimization fires if the derived dtor has no work to do (and thus
> without the optimization Clang emits a derived dtor that simply contains a
> call to the base dtor?)?
>
> The usual "What does GCC do?" might be helpful - do they ever do this? Do
> they do it only > -O0?

They never emit an alias from derived to base (even with local
classes). With optimizations you get a direct call, but I am not sure
exactly which optimization is doing it.

Cheers,
Rafael



More information about the cfe-commits mailing list