summaryrefslogtreecommitdiffstats
path: root/libcxx/include/__string
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-09-15 22:27:07 +0000
committerEric Fiselier <eric@efcs.ca>2016-09-15 22:27:07 +0000
commit49e2967f2709b6333ae9373cf304af97a3ea785f (patch)
tree8869f0b5cefc466e2fb340b9e3ecc07e3c0bb616 /libcxx/include/__string
parent8da42cc5d31384361de9abf645c2e6f95c94198c (diff)
downloadbcm5719-llvm-49e2967f2709b6333ae9373cf304af97a3ea785f.tar.gz
bcm5719-llvm-49e2967f2709b6333ae9373cf304af97a3ea785f.zip
[libc++] Fix and document visibility attributes for Clang, GCC and Windows.
Summary: This patch fixes a number of problems with the visibility macros across GCC (on Unix) and Windows (DLL import/export semantics). All of the visibility macros are now documented under `DesignDocs/VisibilityMacros.rst`. Now I'll no longer forget the subtleties of each! This patch adds two new visibility macros: * `_LIBCPP_ENUM_VIS` for controlling the typeinfo of enum types. Only Clang supports this. * `_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS` for redefining visibility on explicit instantiation declarations. Clang and Windows require this. After applying this patch GCC only emits one -Wattribute warning opposed to 30+. Reviewers: mclow.lists, EricWF Subscribers: beanz, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D24602 llvm-svn: 281673
Diffstat (limited to 'libcxx/include/__string')
-rw-r--r--libcxx/include/__string3
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxx/include/__string b/libcxx/include/__string
index 764ee56a822..fc6097a1e0b 100644
--- a/libcxx/include/__string
+++ b/libcxx/include/__string
@@ -701,7 +701,8 @@ __str_find_last_not_of(const _CharT *__p, _SizeT __sz,
}
template<class _Ptr>
-size_t _LIBCPP_INLINE_VISIBILITY __do_string_hash(_Ptr __p, _Ptr __e)
+inline _LIBCPP_INLINE_VISIBILITY
+size_t __do_string_hash(_Ptr __p, _Ptr __e)
{
typedef typename iterator_traits<_Ptr>::value_type value_type;
return __murmur2_or_cityhash<size_t>()(__p, (__e-__p)*sizeof(value_type));
OpenPOWER on IntegriCloud