[cfe-dev] libc++ internals visibility rational
Eric Fiselier via cfe-dev
cfe-dev at lists.llvm.org
Fri Mar 31 23:49:06 PDT 2017
Honestly I've been wondering about the same things.
Libc++ needs to re-evaluate it's entire approach to symbol visibility
especially w.r.t ABI management.
I think a lot of the existing behavior is purely historical, and newer
parts of the library just try to mimic that
regardless of QoI. In particular I'm sceptical that libc++'s use of
__always_inline__ helps prevent "ABI problems".
I would love to start a discussion on this, especially if it leads to
concrete example
that can be turned into test cases
/Eric
On Fri, Mar 31, 2017 at 11:57 PM, Mehdi Amini via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> Similarly with the public free template functions:
>
>
> template <class _L0, class _L1>
> void
> lock(_L0& __l0, _L1& __l1)
>
> and
>
> template <class _L0, class _L1, class _L2, class ..._L3>
> inline _LIBCPP_INLINE_VISIBILITY
> void
> lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3& ā¦__l3)
>
>
> ā
> Mehdi
>
>
>
> > On Mar 31, 2017, at 10:46 PM, Mehdi Amini via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
> >
> > Hi,
> >
> > Iām wondering about libc++ visibility for the internals of the library.
> For example why do we define:
> >
> > _LIBCPP_INLINE_VISIBILITY
> > void __construct_at_end(size_type __n, const_reference __x);
> >
> > with inline/hidden visibility, but not this one:
> >
> > template <class _ForwardIterator>
> > typename enable_if <__is_forward_iterator<_ForwardIterator>::value,
> void>::type
> > __construct_at_end(_ForwardIterator __first, _ForwardIterator __last,
> size_type __n);
> >
> >
> > Thanks,
> >
> > ā
> > Mehdi
> >
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170401/415fd3fa/attachment.html>
More information about the cfe-dev
mailing list