HomePhabricator

[libc++] Use exclude_from_explicit_instantiation instead of always_inline

Description

[libc++] Use exclude_from_explicit_instantiation instead of always_inline

Summary:
This commit adopts the exclude_from_explicit_instantiation attribute discussed
at [1] and reviewed in [2] in libc++ to supplant the use of always_inline
for visibility purposes.

This change means that users wanting to link together translation units built
with different versions of libc++'s headers into the same final linked image
MUST define the _LIBCPP_HIDE_FROM_ABI_PER_TU macro to 1 when building those
TUs. Doing otherwise will lead to ODR violations and ABI issues.

[1]: http://lists.llvm.org/pipermail/cfe-dev/2018-August/059024.html
[2]: https://reviews.llvm.org/D51789

Reviewers: rsmith, EricWF

Subscribers: dexonsmith, libcxx-commits

Differential Revision: https://reviews.llvm.org/D52405

Details

Committed
ldionneOct 29 2018, 10:30 AM
Differential Revision
D52405: [libc++] Use exclude_from_explicit_instantiation instead of always_inline
Branches
Unknown
Tags
Unknown