aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Fonseca <[email protected]>2015-05-28 10:11:36 +0100
committerEmil Velikov <[email protected]>2015-09-17 14:58:37 +0100
commitd7cdb5be87af9112f036d6fc47034dfb00dbac80 (patch)
tree1620a76e6fadd0a781f35e75ac6bff851bbc1ab7
parentff8f2402fd791fd0243d4e1bc4e1d18b4c04b9a7 (diff)
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. (cherry picked from commit 09d6243aed016eed4518435c9885275dbb6d2aa9) Nominated-by: Sedat Dilek <[email protected]>
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_misc.cpp11
1 files changed, 11 insertions, 0 deletions
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 <stddef.h>
+// Workaround http://llvm.org/PR23628
+#if HAVE_LLVM >= 0x0307
+# pragma push_macro("DEBUG")
+# undef DEBUG
+#endif
+
#include <llvm-c/Core.h>
#include <llvm-c/ExecutionEngine.h>
#include <llvm/Target/TargetOptions.h>
@@ -70,6 +76,11 @@
#include <llvm/IR/Module.h>
#include <llvm/Support/CBindingWrapping.h>
+// 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"