From e0de7aa4d7717bbd79bbc5bfc660f941f680402b Mon Sep 17 00:00:00 2001 From: James Park Date: Sat, 23 Oct 2021 18:02:48 -0700 Subject: [PATCH] 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 Part-of: --- src/amd/compiler/aco_print_asm.cpp | 3 +++ 1 file changed, 3 insertions(+) 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"