[PATCH] Don't instrument inline functions that are not externally visible

Reid Kleckner rnk at google.com
Tue Dec 3 10:35:23 PST 2013


I made sure to CC your directly on the reply, FWIW.

This patch still doesn't make sense to me.  What's special about
non-externally visible inline functions?  If you look at if it's inline
specified in the frontend, that doesn't tell you if it actually gets
inlined.  Why doesn't this apply to static functions that get inlined and
aren't inline-specified?

And finally, what's wrong with the linker such that it can't resolve the
address of an internal inline function?  That seems like a perfectly
reasonable thing for it to be able to do.  If you take the address of a
function, the compiler should make sure not to delete the definition.


On Tue, Dec 3, 2013 at 3:05 AM, Gonzalo Brito Gadeschi <
g.brito at aia.rwth-aachen.de> wrote:

> From: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131125/094256.html
>
>
>
>>
>>
>> I've tried to ask you twice to explain why this is necessary:
>>
>
>
> Sorry, I was not subscribed to the list and was not getting any replies. I should be able to reply from now on.
>
>
>
>> >* Can you elaborate on why the linker can't resolve references to an *internal
>> inline function? That seems like a perfectly reasonable thing for
>> it to be able to do.
>
>
> "Inline functions that are not externally visible mustn't be instrumented. They create a named reference to the inlined function, as the first parameter to __cyg_profile_* functions, which a linker will never be able to resolve."
>
> --
> Dipl.-Ing. Gonzalo Brito Gadeschi
> Institute of Aerodynamics and Chair of Fluid Mechanics
> RWTH Aachen University
> Wuellnerstraße 5a
> D-52062 Aachen
> Germany
> Phone: ++49-(0)241-80-94821
> Fax: ++49-(0)241-80-92257
> E-mail:  g.brito at aia.rwth-aachen.de
> Internet: www.aia.rwth-aachen.de
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131203/c7aa2d4c/attachment.html>


More information about the cfe-commits mailing list