diff options
author | James Park <jpark37@lagfreegames.com> | 2021-10-23 18:02:48 -0700 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2021-11-10 16:37:51 +0000 |
commit | e0de7aa4d7717bbd79bbc5bfc660f941f680402b (patch) | |
tree | 3c460e522ac4c8e515720c3b2477e2e97b32a996 | |
parent | a697dde5535e7b2a0bd9a29221e93654f4531632 (diff) |
aco: Work around MSVC restrict in c99_compat.h
Future LLVM header leads to __declspec(__restrict), which is invalid.
Just undefine the restrict macro to keep __declspec(restrict).
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13505>
-rw-r--r-- | src/amd/compiler/aco_print_asm.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/amd/compiler/aco_print_asm.cpp b/src/amd/compiler/aco_print_asm.cpp index 9f15de5aacd..cbd29e13212 100644 --- a/src/amd/compiler/aco_print_asm.cpp +++ b/src/amd/compiler/aco_print_asm.cpp @@ -25,6 +25,9 @@ #include "aco_ir.h" #ifdef LLVM_AVAILABLE +#if defined(_MSC_VER) && defined(restrict) +#undef restrict +#endif #include "llvm/ac_llvm_util.h" #include "llvm-c/Disassembler.h" |