mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
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:
parent
f52e63069a
commit
34c5e58a68
2 changed files with 11 additions and 11 deletions
|
|
@ -93,17 +93,6 @@ typedef unsigned char boolean;
|
|||
#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__
|
||||
|
|
|
|||
|
|
@ -136,6 +136,17 @@ do { \
|
|||
#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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue