[libcxx-commits] [libcxx] 21ef59a - [libcxx] Replace remaining _LIBCPP_INLINE_VISIBILITY in __support

Brad Smith via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jul 16 16:09:41 PDT 2022


Author: Brad Smith
Date: 2022-07-16T19:08:34-04:00
New Revision: 21ef59a55ed0831f8513eb0da150b010ad43e748

URL: https://github.com/llvm/llvm-project/commit/21ef59a55ed0831f8513eb0da150b010ad43e748
DIFF: https://github.com/llvm/llvm-project/commit/21ef59a55ed0831f8513eb0da150b010ad43e748.diff

LOG: [libcxx] Replace remaining _LIBCPP_INLINE_VISIBILITY in __support

Replace remaining _LIBCPP_INLINE_VISIBILITY in __support with _LIBCPP_HIDE_FROM_ABI.

Reviewed by: Mordante

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

Added: 
    

Modified: 
    libcxx/include/__support/android/locale_bionic.h
    libcxx/include/__support/win32/locale_win32.h
    libcxx/include/__support/xlocale/__posix_l_fallback.h
    libcxx/include/__support/xlocale/__strtonum_fallback.h

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__support/android/locale_bionic.h b/libcxx/include/__support/android/locale_bionic.h
index 535bad7856480..c41e26420fa5e 100644
--- a/libcxx/include/__support/android/locale_bionic.h
+++ b/libcxx/include/__support/android/locale_bionic.h
@@ -46,18 +46,18 @@ extern "C" {
 extern "C" {
 #endif
 
-inline _LIBCPP_INLINE_VISIBILITY float strtof_l(const char* __nptr, char** __endptr,
-                                                locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI float
+strtof_l(const char* __nptr, char** __endptr, locale_t) {
   return ::strtof(__nptr, __endptr);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY double strtod_l(const char* __nptr,
-                                                 char** __endptr, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI double
+strtod_l(const char* __nptr, char** __endptr, locale_t) {
   return ::strtod(__nptr, __endptr);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY long strtol_l(const char* __nptr, char** __endptr,
-                                               int __base, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI long
+strtol_l(const char* __nptr, char** __endptr, int __base, locale_t) {
   return ::strtol(__nptr, __endptr, __base);
 }
 

diff  --git a/libcxx/include/__support/win32/locale_win32.h b/libcxx/include/__support/win32/locale_win32.h
index c38205faddd56..8127f286b6f38 100644
--- a/libcxx/include/__support/win32/locale_win32.h
+++ b/libcxx/include/__support/win32/locale_win32.h
@@ -223,15 +223,13 @@ decltype(MB_CUR_MAX) MB_CUR_MAX_L( locale_t __l );
 _LIBCPP_FUNC_VIS float strtof_l(const char*, char**, locale_t);
 _LIBCPP_FUNC_VIS long double strtold_l(const char*, char**, locale_t);
 #endif
-inline _LIBCPP_INLINE_VISIBILITY
-int
+inline _LIBCPP_HIDE_FROM_ABI int
 islower_l(int __c, _locale_t __loc)
 {
  return _islower_l((int)__c, __loc);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-int
+inline _LIBCPP_HIDE_FROM_ABI int
 isupper_l(int __c, _locale_t __loc)
 {
  return _isupper_l((int)__c, __loc);

diff  --git a/libcxx/include/__support/xlocale/__posix_l_fallback.h b/libcxx/include/__support/xlocale/__posix_l_fallback.h
index e2b1f62f574dd..294149eb8ff9c 100644
--- a/libcxx/include/__support/xlocale/__posix_l_fallback.h
+++ b/libcxx/include/__support/xlocale/__posix_l_fallback.h
@@ -19,141 +19,141 @@
 extern "C" {
 #endif
 
-inline _LIBCPP_INLINE_VISIBILITY int isalnum_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int isalnum_l(int __c, locale_t) {
   return ::isalnum(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int isalpha_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int isalpha_l(int __c, locale_t) {
   return ::isalpha(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int isblank_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int isblank_l(int __c, locale_t) {
   return ::isblank(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int iscntrl_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iscntrl_l(int __c, locale_t) {
   return ::iscntrl(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int isdigit_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int isdigit_l(int __c, locale_t) {
   return ::isdigit(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int isgraph_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int isgraph_l(int __c, locale_t) {
   return ::isgraph(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int islower_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int islower_l(int __c, locale_t) {
   return ::islower(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int isprint_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int isprint_l(int __c, locale_t) {
   return ::isprint(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int ispunct_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int ispunct_l(int __c, locale_t) {
   return ::ispunct(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int isspace_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int isspace_l(int __c, locale_t) {
   return ::isspace(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int isupper_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int isupper_l(int __c, locale_t) {
   return ::isupper(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int isxdigit_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int isxdigit_l(int __c, locale_t) {
   return ::isxdigit(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int iswalnum_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswalnum_l(wint_t __c, locale_t) {
   return ::iswalnum(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int iswalpha_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswalpha_l(wint_t __c, locale_t) {
   return ::iswalpha(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int iswblank_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswblank_l(wint_t __c, locale_t) {
   return ::iswblank(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int iswcntrl_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswcntrl_l(wint_t __c, locale_t) {
   return ::iswcntrl(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int iswdigit_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswdigit_l(wint_t __c, locale_t) {
   return ::iswdigit(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int iswgraph_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswgraph_l(wint_t __c, locale_t) {
   return ::iswgraph(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int iswlower_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswlower_l(wint_t __c, locale_t) {
   return ::iswlower(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int iswprint_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswprint_l(wint_t __c, locale_t) {
   return ::iswprint(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int iswpunct_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswpunct_l(wint_t __c, locale_t) {
   return ::iswpunct(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int iswspace_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswspace_l(wint_t __c, locale_t) {
   return ::iswspace(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int iswupper_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswupper_l(wint_t __c, locale_t) {
   return ::iswupper(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int iswxdigit_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int iswxdigit_l(wint_t __c, locale_t) {
   return ::iswxdigit(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int toupper_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int toupper_l(int __c, locale_t) {
   return ::toupper(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int tolower_l(int __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int tolower_l(int __c, locale_t) {
   return ::tolower(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY wint_t towupper_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI wint_t towupper_l(wint_t __c, locale_t) {
   return ::towupper(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY wint_t towlower_l(wint_t __c, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI wint_t towlower_l(wint_t __c, locale_t) {
   return ::towlower(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int strcoll_l(const char *__s1, const char *__s2,
-                                               locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int
+strcoll_l(const char *__s1, const char *__s2, locale_t) {
   return ::strcoll(__s1, __s2);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY size_t strxfrm_l(char *__dest, const char *__src,
-                                                  size_t __n, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI size_t
+strxfrm_l(char *__dest, const char *__src, size_t __n, locale_t) {
   return ::strxfrm(__dest, __src, __n);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY size_t strftime_l(char *__s, size_t __max,
-                                                   const char *__format,
-                                                   const struct tm *__tm, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI size_t
+strftime_l(char *__s, size_t __max, const char *__format, const struct tm *__tm,
+           locale_t) {
   return ::strftime(__s, __max, __format, __tm);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int wcscoll_l(const wchar_t *__ws1,
-                                               const wchar_t *__ws2, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int
+wcscoll_l(const wchar_t *__ws1, const wchar_t *__ws2, locale_t) {
   return ::wcscoll(__ws1, __ws2);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY size_t wcsxfrm_l(wchar_t *__dest, const wchar_t *__src,
-                                                  size_t __n, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI size_t
+wcsxfrm_l(wchar_t *__dest, const wchar_t *__src, size_t __n, locale_t) {
   return ::wcsxfrm(__dest, __src, __n);
 }
 

diff  --git a/libcxx/include/__support/xlocale/__strtonum_fallback.h b/libcxx/include/__support/xlocale/__strtonum_fallback.h
index 497148a662659..ae1e1c8dfbcf2 100644
--- a/libcxx/include/__support/xlocale/__strtonum_fallback.h
+++ b/libcxx/include/__support/xlocale/__strtonum_fallback.h
@@ -19,43 +19,43 @@
 extern "C" {
 #endif
 
-inline _LIBCPP_INLINE_VISIBILITY float strtof_l(const char *__nptr,
-                                                char **__endptr, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int float
+strtof_l(const char *__nptr, char **__endptr, locale_t) {
   return ::strtof(__nptr, __endptr);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY double strtod_l(const char *__nptr,
-                                                 char **__endptr, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int double
+strtod_l(const char *__nptr, char **__endptr, locale_t) {
   return ::strtod(__nptr, __endptr);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY long double strtold_l(const char *__nptr,
-                                                       char **__endptr, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int long double
+strtold_l(const char *__nptr, char **__endptr, locale_t) {
   return ::strtold(__nptr, __endptr);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY long long
+inline _LIBCPP_HIDE_FROM_ABI int long long
 strtoll_l(const char *__nptr, char **__endptr, int __base, locale_t) {
   return ::strtoll(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY unsigned long long
+inline _LIBCPP_HIDE_FROM_ABI int unsigned long long
 strtoull_l(const char *__nptr, char **__endptr, int __base, locale_t) {
   return ::strtoull(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY long long
+inline _LIBCPP_HIDE_FROM_ABI int long long
 wcstoll_l(const wchar_t *__nptr, wchar_t **__endptr, int __base, locale_t) {
   return ::wcstoll(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY unsigned long long
+inline _LIBCPP_HIDE_FROM_ABI int unsigned long long
 wcstoull_l(const wchar_t *__nptr, wchar_t **__endptr, int __base, locale_t) {
   return ::wcstoull(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY long double wcstold_l(const wchar_t *__nptr,
-                                                       wchar_t **__endptr, locale_t) {
+inline _LIBCPP_HIDE_FROM_ABI int long double
+wcstold_l(const wchar_t *__nptr, wchar_t **__endptr, locale_t) {
   return ::wcstold(__nptr, __endptr);
 }
 


        


More information about the libcxx-commits mailing list