forked from OSchip/llvm-project
[libc++] Fix inline attribute for non-MSVC Windows
gcc and clang in gcc compatibility mode do not accept __forceinline. Use the gcc attribute for them instead. Differential Revision: https://reviews.llvm.org/D24678 llvm-svn: 281766
This commit is contained in:
parent
e04c274e35
commit
3b33938c05
|
@ -560,9 +560,15 @@ namespace std {
|
|||
#define _LIBCPP_TYPE_VIS_ONLY
|
||||
#define _LIBCPP_FUNC_VIS_ONLY
|
||||
#define _LIBCPP_ENUM_VIS
|
||||
#define _LIBCPP_INLINE_VISIBILITY __forceinline
|
||||
#define _LIBCPP_ALWAYS_INLINE __forceinline
|
||||
#define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY __forceinline
|
||||
#if defined(_LIBCPP_MSVC)
|
||||
# define _LIBCPP_INLINE_VISIBILITY __forceinline
|
||||
# define _LIBCPP_ALWAYS_INLINE __forceinline
|
||||
# define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY __forceinline
|
||||
#else
|
||||
# define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__always_inline__))
|
||||
# define _LIBCPP_ALWAYS_INLINE __attribute__ ((__always_inline__))
|
||||
# define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY __attribute__ ((__always_inline__))
|
||||
#endif
|
||||
#endif // _WIN32
|
||||
|
||||
#ifndef _LIBCPP_HIDDEN
|
||||
|
|
Loading…
Reference in New Issue