Module: Mesa
Branch: main
Commit: f11aab743b64954f78ef6eb944ff65b8f14fff19
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f11aab743b64954f78ef6eb944ff65b8f14fff19

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]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20825>

---

 src/util/macros.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/util/macros.h b/src/util/macros.h
index 672f2a04574..580fc8dccd2 100644
--- a/src/util/macros.h
+++ b/src/util/macros.h
@@ -493,4 +493,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 */

Reply via email to