From 4a81bdfa70f994b14becdf28c8e57130ebf86803 Mon Sep 17 00:00:00 2001 From: Raed Rizqie Date: Wed, 3 Jul 2024 06:37:54 +0800 Subject: [PATCH] Avoid NOMINMAX redefinition warnings (#6729) On MinGW, NOMINMAX is defined by default, so guard it to avoid redefinition warnings. --- tools/clang/utils/TableGen/TableGen.cpp | 2 ++ utils/TableGen/TableGen.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tools/clang/utils/TableGen/TableGen.cpp b/tools/clang/utils/TableGen/TableGen.cpp index 0a02bfca2f..ab64132347 100644 --- a/tools/clang/utils/TableGen/TableGen.cpp +++ b/tools/clang/utils/TableGen/TableGen.cpp @@ -21,7 +21,9 @@ // HLSL Change Starts #ifdef _WIN32 +#ifndef NOMINMAX #define NOMINMAX +#endif #include #endif diff --git a/utils/TableGen/TableGen.cpp b/utils/TableGen/TableGen.cpp index a470e8662f..b5ab299bac 100644 --- a/utils/TableGen/TableGen.cpp +++ b/utils/TableGen/TableGen.cpp @@ -22,7 +22,9 @@ // HLSL Change Starts #ifdef _WIN32 +#ifndef NOMINMAX #define NOMINMAX +#endif #include #endif