Module: Mesa Branch: master Commit: 34c5e58a6816ecfe9f944f5cf921261648324728 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=34c5e58a6816ecfe9f944f5cf921261648324728
Author: Timothy Arceri <tarc...@itsqueeze.com> Date: Mon May 8 08:01:05 2017 +1000 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.haeh...@amd.com> --- src/gallium/include/pipe/p_compiler.h | 11 ----------- src/util/macros.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h index 0d7b014958..2869517389 100644 --- a/src/gallium/include/pipe/p_compiler.h +++ b/src/gallium/include/pipe/p_compiler.h @@ -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__ diff --git a/src/util/macros.h b/src/util/macros.h index 6f55ac667d..a10f1de814 100644 --- a/src/util/macros.h +++ b/src/util/macros.h @@ -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. */ _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit