[cfe-dev] libc++ is not using always_inline anymore!

Mehdi AMINI via cfe-dev cfe-dev at lists.llvm.org
Tue Nov 13 15:55:04 PST 2018


Hey Reid,

Le mar. 13 nov. 2018 à 14:03, Reid Kleckner <rnk at google.com> a écrit :

> On Sun, Nov 11, 2018 at 5:49 PM Mehdi AMINI via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
>> However "good" this change is, I don't really see how it exonerates from
>> what I'm asking: we should think hard about tools/framework to catch
>> mistakes before introducing narrow contracts.
>>
>
> I should apologize, there was a lot of discussion that I didn't read all
> of, but I should point out that there are many people working hard on ODR
> violation detection tools. See Richard Trieu's AST hashing stuff. In the
> long run, this kind of version header skew should be detectable with a
> tool,
>

Thanks for pointing this! This looks like a perfect answer to my
question/concern.

Best,

-- 
Mehdi



> and users will still have this macro to get back the old guarantee so they
> can link anyway with that skew and have things mostly work.
>
> In the meantime, yes, people with this problem (so far as I'm aware,
> nobody has indicated that they actually have this use case) may end up
> debugging some nasty crashes caused by header version skew. But, the cost
> of the always_inline "solution" for everyone else was too great, and in the
> last RFC we agreed that it was best to stop providing this guarantee by
> default. It's not ideal for now, but we can expect to get better tooling
> here in the future.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181113/5f45aa84/attachment.html>


More information about the cfe-dev mailing list