Mesa (master): util/macros: Add ATTRIBUTE_NOINLINE definition for MSVC

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Aug 13 23:51:08 UTC 2020


Module: Mesa
Branch: master
Commit: 65d7172d171b5a209ddb9f90ea7acc8105452816
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=65d7172d171b5a209ddb9f90ea7acc8105452816

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Thu Aug 13 13:10:41 2020 -0700

util/macros: Add ATTRIBUTE_NOINLINE definition for MSVC

Reviewed-by: Kristian H. Kristensen <hoegsberg at google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6303>

---

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

diff --git a/src/util/macros.h b/src/util/macros.h
index 57beaf72fae..04aec96b546 100644
--- a/src/util/macros.h
+++ b/src/util/macros.h
@@ -264,6 +264,8 @@ do {                       \
 
 #if defined(__GNUC__)
 #define ATTRIBUTE_NOINLINE __attribute__((noinline))
+#elif defined(_MSC_VER)
+#define ATTRIBUTE_NOINLINE __declspec(noinline)
 #else
 #define ATTRIBUTE_NOINLINE
 #endif



More information about the mesa-commit mailing list