util: move ALWAYS_INLINE macro to util/macro.h
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>
This commit is contained in:
@@ -93,17 +93,6 @@ typedef unsigned char boolean;
|
|||||||
#endif
|
#endif
|
||||||
#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 */
|
/* XXX: Use standard `__func__` instead */
|
||||||
#ifndef __FUNCTION__
|
#ifndef __FUNCTION__
|
||||||
|
@@ -136,6 +136,17 @@ do { \
|
|||||||
#define MALLOCLIKE
|
#define MALLOCLIKE
|
||||||
#endif
|
#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
|
/* Used to optionally mark structures with misaligned elements or size as
|
||||||
* packed, to trade off performance for space.
|
* packed, to trade off performance for space.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user