summaryrefslogtreecommitdiff
path: root/include/scoped_allocator
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-09-25 03:14:13 +0000
committerEric Fiselier <eric@efcs.ca>2016-09-25 03:14:13 +0000
commit1deaf196f43b3c54140b59ca483008cb75e6e936 (patch)
treebc4378dea4a3e747da3f9b86957e2d7cfcc47711 /include/scoped_allocator
parent12779628764220f84553317f79091dd0db4157b9 (diff)
Use __attribute__((internal_linkage)) when available.
Summary: This patch has been a long time coming (Thanks @eugenis). It changes `_LIBCPP_INLINE_VISIBILITY` to use `__attribute__((internal_linkage))` instead of `__attribute__((visibility("hidden"), always_inline))`. The point of `_LIBCPP_INLINE_VISIBILITY` is to prevent inline functions from being exported from both the libc++ library and from user libraries. This helps libc++ better manage it's ABI. Previously this was done by forcing inlining and modifying the symbols visibility. However inlining isn't guaranteed and symbol visibility only affects shared libraries making this an imperfect solution. `internal_linkage` improves this situation by making all symbols local to the TU they are emitted in, regardless of inlining or visibility. IIRC the effect of applying `__attribute__((internal_linkage))` to an inline function is the same as applying `static`. For more information about the attribute see: http://lists.llvm.org/pipermail/cfe-dev/2015-October/045580.html Most of the work for this patch was done by @eugenis. Reviewers: mclow.lists, eugenis Subscribers: eugenis, cfe-commits Differential Revision: https://reviews.llvm.org/D24642 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@282345 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/scoped_allocator')
0 files changed, 0 insertions, 0 deletions