aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/StringRefTest.cpp
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
commit9e1b0b5b788ac4ede3f239acddfeed10e84aaeac (patch)
treeb59af40f29edb4c039041584c27669845b7ae818 /llvm/unittests/ADT/StringRefTest.cpp
parent8f2e85e66927a96d6e91c8a98420a59bd81ae3f7 (diff)
downloadllvm-9e1b0b5b788ac4ede3f239acddfeed10e84aaeac.zip
llvm-9e1b0b5b788ac4ede3f239acddfeed10e84aaeac.tar.gz
llvm-9e1b0b5b788ac4ede3f239acddfeed10e84aaeac.tar.bz2
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 llvm-svn: 282345
Diffstat (limited to 'llvm/unittests/ADT/StringRefTest.cpp')
0 files changed, 0 insertions, 0 deletions