summaryrefslogtreecommitdiffstats
path: root/libcxx/include/__config
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/__config')
-rw-r--r--libcxx/include/__config12
1 files changed, 9 insertions, 3 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config
index 5dd910421dc..e0d2da72ec7 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -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
OpenPOWER on IntegriCloud