Module: Mesa Branch: staging/23.0 Commit: af2148e26135376e6f71f888558b41cc5e70116d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=af2148e26135376e6f71f888558b41cc5e70116d
Author: Mark Janes <[email protected]> Date: Wed Feb 22 14:52:34 2023 -0800 util: add macro to support gcc/clang poison Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (back ported from commit f11aab743b64954f78ef6eb944ff65b8f14fff19) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22351> --- src/util/macros.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/util/macros.h b/src/util/macros.h index 84b2cddfbae..44c0f254cd5 100644 --- a/src/util/macros.h +++ b/src/util/macros.h @@ -483,4 +483,12 @@ typedef int lock_cap_t; #define CONCAT3(a, b, c) PASTE3(a, b, c) #define CONCAT4(a, b, c, d) PASTE4(a, b, c, d) +#if defined(__GNUC__) +#define PRAGMA_POISON(X) DO_PRAGMA( GCC poison X ) +#elif defined(__clang__) +#define PRAGMA_POISON(X) DO_PRAGMA( clang poison X ) +#else +#define PRAGMA_POISON +#endif + #endif /* UTIL_MACROS_H */
