util/macros: Add ATTRIBUTE_NOINLINE definition for MSVC

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6303>
This commit is contained in:
Jesse Natalie 2020-08-13 13:10:41 -07:00 committed by Marge Bot
parent 58af31186a
commit 65d7172d17
1 changed files with 2 additions and 0 deletions

View 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