Also added clang check.
macro.h is include by p_compiler.h so no other change is needed.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
#endif
#endif
-/* Forced function inlining */
-#ifndef ALWAYS_INLINE
-# ifdef __GNUC__
-# define ALWAYS_INLINE inline __attribute__((always_inline))
-# elif defined(_MSC_VER)
-# define ALWAYS_INLINE __forceinline
-# else
-# define ALWAYS_INLINE inline
-# endif
-#endif
-
/* XXX: Use standard `__func__` instead */
#ifndef __FUNCTION__
#define MALLOCLIKE
#endif
+/* Forced function inlining */
+#ifndef ALWAYS_INLINE
+# if defined(__GNUC__) || defined(__clang__)
+# define ALWAYS_INLINE inline __attribute__((always_inline))
+# elif defined(_MSC_VER)
+# define ALWAYS_INLINE __forceinline
+# else
+# define ALWAYS_INLINE inline
+# endif
+#endif
+
/* Used to optionally mark structures with misaligned elements or size as
* packed, to trade off performance for space.
*/