aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/experimental
diff options
context:
space:
mode:
authorLouis Dionne <ldionne.2@gmail.com>2023-12-04 10:25:14 -0500
committerGitHub <noreply@github.com>2023-12-04 10:25:14 -0500
commit4c198542226223f6a5c5511a1f89b37d15ee10b9 (patch)
treee8a8e3add9ec6404cfc91db5cd7d2debefe34d00 /libcxx/include/experimental
parentc4b795df8075b111fc14cb5409f7138c32313a9b (diff)
downloadllvm-4c198542226223f6a5c5511a1f89b37d15ee10b9.zip
llvm-4c198542226223f6a5c5511a1f89b37d15ee10b9.tar.gz
llvm-4c198542226223f6a5c5511a1f89b37d15ee10b9.tar.bz2
[libc++] Rename _LIBCPP_INLINE_VISIBILITY to _LIBCPP_HIDE_FROM_ABI (#74095)
In preparation for running clang-format on the whole code base, we are also removing mentions of the legacy _LIBCPP_INLINE_VISIBILITY macro in favor of the newer _LIBCPP_HIDE_FROM_ABI. We're still leaving the definition of _LIBCPP_INLINE_VISIBILITY to avoid creating needless breakage in case some older patches are checked-in with mentions of the old macro. After we branch for LLVM 18, we can do another pass to clean up remaining uses of the macro that might have gotten introduced by mistake (if any) and remove the macro itself at the same time. This is just a minor convenience to smooth out the transition as much as possible. See https://discourse.llvm.org/t/rfc-clang-formatting-all-of-libc-once-and-for-all for the clang-format proposal.
Diffstat (limited to 'libcxx/include/experimental')
-rw-r--r--libcxx/include/experimental/__memory8
-rw-r--r--libcxx/include/experimental/propagate_const50
2 files changed, 29 insertions, 29 deletions
diff --git a/libcxx/include/experimental/__memory b/libcxx/include/experimental/__memory
index b1136963..c1abe34 100644
--- a/libcxx/include/experimental/__memory
+++ b/libcxx/include/experimental/__memory
@@ -82,7 +82,7 @@ struct __lfts_uses_alloc_ctor
{};
template <class _Tp, class _Allocator, class... _Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
void __user_alloc_construct_impl (integral_constant<int, 0>, _Tp *__storage, const _Allocator &, _Args &&... __args )
{
new (__storage) _Tp (_VSTD::forward<_Args>(__args)...);
@@ -90,7 +90,7 @@ void __user_alloc_construct_impl (integral_constant<int, 0>, _Tp *__storage, con
// FIXME: This should have a version which takes a non-const alloc.
template <class _Tp, class _Allocator, class... _Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
void __user_alloc_construct_impl (integral_constant<int, 1>, _Tp *__storage, const _Allocator &__a, _Args &&... __args )
{
new (__storage) _Tp (allocator_arg_t(), __a, _VSTD::forward<_Args>(__args)...);
@@ -98,14 +98,14 @@ void __user_alloc_construct_impl (integral_constant<int, 1>, _Tp *__storage, con
// FIXME: This should have a version which takes a non-const alloc.
template <class _Tp, class _Allocator, class... _Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
void __user_alloc_construct_impl (integral_constant<int, 2>, _Tp *__storage, const _Allocator &__a, _Args &&... __args )
{
new (__storage) _Tp (_VSTD::forward<_Args>(__args)..., __a);
}
template <class _Tp, class _Alloc, class ..._Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_HIDE_FROM_ABI
void __lfts_user_alloc_construct(
_Tp * __store, const _Alloc & __a, _Args &&... __args)
{
diff --git a/libcxx/include/experimental/propagate_const b/libcxx/include/experimental/propagate_const
index 4fc8286..84809e7 100644
--- a/libcxx/include/experimental/propagate_const
+++ b/libcxx/include/experimental/propagate_const
@@ -146,11 +146,11 @@ template <class _Tp>
class propagate_const;
template <class _Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
const _Up& get_underlying(const propagate_const<_Up>& __pu) _NOEXCEPT;
template <class _Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
_Up& get_underlying(propagate_const<_Up>& __pu) _NOEXCEPT;
template <class _Tp>
@@ -320,35 +320,35 @@ public:
template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt, nullptr_t)
{
return _VSTD_LFTS_V2::get_underlying(__pt) == nullptr;
}
template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator==(nullptr_t, const propagate_const<_Tp>& __pt)
{
return nullptr == _VSTD_LFTS_V2::get_underlying(__pt);
}
template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt, nullptr_t)
{
return _VSTD_LFTS_V2::get_underlying(__pt) != nullptr;
}
template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator!=(nullptr_t, const propagate_const<_Tp>& __pt)
{
return nullptr != _VSTD_LFTS_V2::get_underlying(__pt);
}
template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt,
const propagate_const<_Up>& __pu)
{
@@ -356,7 +356,7 @@ _LIBCPP_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt,
}
template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt,
const propagate_const<_Up>& __pu)
{
@@ -364,7 +364,7 @@ _LIBCPP_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt,
}
template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator<(const propagate_const<_Tp>& __pt,
const propagate_const<_Up>& __pu)
{
@@ -372,7 +372,7 @@ _LIBCPP_CONSTEXPR bool operator<(const propagate_const<_Tp>& __pt,
}
template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator>(const propagate_const<_Tp>& __pt,
const propagate_const<_Up>& __pu)
{
@@ -380,7 +380,7 @@ _LIBCPP_CONSTEXPR bool operator>(const propagate_const<_Tp>& __pt,
}
template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator<=(const propagate_const<_Tp>& __pt,
const propagate_const<_Up>& __pu)
{
@@ -388,7 +388,7 @@ _LIBCPP_CONSTEXPR bool operator<=(const propagate_const<_Tp>& __pt,
}
template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator>=(const propagate_const<_Tp>& __pt,
const propagate_const<_Up>& __pu)
{
@@ -396,42 +396,42 @@ _LIBCPP_CONSTEXPR bool operator>=(const propagate_const<_Tp>& __pt,
}
template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt, const _Up& __u)
{
return _VSTD_LFTS_V2::get_underlying(__pt) == __u;
}
template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt, const _Up& __u)
{
return _VSTD_LFTS_V2::get_underlying(__pt) != __u;
}
template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator<(const propagate_const<_Tp>& __pt, const _Up& __u)
{
return _VSTD_LFTS_V2::get_underlying(__pt) < __u;
}
template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator>(const propagate_const<_Tp>& __pt, const _Up& __u)
{
return _VSTD_LFTS_V2::get_underlying(__pt) > __u;
}
template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator<=(const propagate_const<_Tp>& __pt, const _Up& __u)
{
return _VSTD_LFTS_V2::get_underlying(__pt) <= __u;
}
template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator>=(const propagate_const<_Tp>& __pt, const _Up& __u)
{
return _VSTD_LFTS_V2::get_underlying(__pt) >= __u;
@@ -439,49 +439,49 @@ _LIBCPP_CONSTEXPR bool operator>=(const propagate_const<_Tp>& __pt, const _Up& _
template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator==(const _Tp& __t, const propagate_const<_Up>& __pu)
{
return __t == _VSTD_LFTS_V2::get_underlying(__pu);
}
template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator!=(const _Tp& __t, const propagate_const<_Up>& __pu)
{
return __t != _VSTD_LFTS_V2::get_underlying(__pu);
}
template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator<(const _Tp& __t, const propagate_const<_Up>& __pu)
{
return __t < _VSTD_LFTS_V2::get_underlying(__pu);
}
template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator>(const _Tp& __t, const propagate_const<_Up>& __pu)
{
return __t > _VSTD_LFTS_V2::get_underlying(__pu);
}
template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator<=(const _Tp& __t, const propagate_const<_Up>& __pu)
{
return __t <= _VSTD_LFTS_V2::get_underlying(__pu);
}
template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR bool operator>=(const _Tp& __t, const propagate_const<_Up>& __pu)
{
return __t >= _VSTD_LFTS_V2::get_underlying(__pu);
}
template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR void swap(propagate_const<_Tp>& __pc1, propagate_const<_Tp>& __pc2) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value)
{
__pc1.swap(__pc2);