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

Reid Kleckner via libcxx-dev libcxx-dev at lists.llvm.org
Tue Nov 13 14:03:18 PST 2018

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, 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-dev/attachments/20181113/6a50b718/attachment.html>

More information about the libcxx-dev mailing list