util/macros: Add ATTRIBUTE_NOINLINE definition for MSVC
authorJesse Natalie <jenatali@microsoft.com>
Thu, 13 Aug 2020 20:10:41 +0000 (13:10 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 13 Aug 2020 23:18:36 +0000 (23:18 +0000)
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6303>

src/util/macros.h

index 57beaf72fae31f8f4bfba7cafb7e2ef33c31b057..04aec96b54667db9c9f8309e5618f6401dedbf5c 100644 (file)
@@ -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