From: Jose Fonseca Date: Thu, 28 May 2015 09:11:36 +0000 (+0100) Subject: gallivm: Workaround LLVM PR23628. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09d6243aed016eed4518435c9885275dbb6d2aa9;p=mesa.git gallivm: Workaround LLVM PR23628. Temporarily undefine DEBUG macro while including LLVM C++ headers, leveraging the push/pop_macro pragmas, which are supported both by GCC and MSVC. https://bugs.freedesktop.org/show_bug.cgi?id=90621 Trivial. --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index ffed9e6b69a..5e25819ac55 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -50,6 +50,12 @@ #include +// Workaround http://llvm.org/PR23628 +#if HAVE_LLVM >= 0x0307 +# pragma push_macro("DEBUG") +# undef DEBUG +#endif + #include #include #include @@ -70,6 +76,11 @@ #include #include +// Workaround http://llvm.org/PR23628 +#if HAVE_LLVM >= 0x0307 +# pragma pop_macro("DEBUG") +#endif + #include "pipe/p_config.h" #include "util/u_debug.h" #include "util/u_cpu_detect.h"