gallivm: Limit DEBUG workaround to LLVM < 7
authorMichel Dänzer <mdaenzer@redhat.com>
Mon, 16 Sep 2019 15:06:19 +0000 (17:06 +0200)
committerMichel Dänzer <michel@daenzer.net>
Tue, 17 Sep 2019 10:24:29 +0000 (10:24 +0000)
As of version 7, LLVM uses LLVM_DEBUG instead of just DEBUG.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/gallium/auxiliary/gallivm/lp_bld_misc.cpp

index 52e9f7bc7707a7f68d73052ef70ff03746711be5..67ae1fa1e93e595c4441e7fd0fb58485d0ef33ea 100644 (file)
 
 #include <llvm/Config/llvm-config.h>
 
+#if LLVM_VERSION_MAJOR < 7
 // Workaround http://llvm.org/PR23628
 #pragma push_macro("DEBUG")
 #undef DEBUG
+#endif
 
 #include <llvm/Config/llvm-config.h>
 #include <llvm-c/Core.h>
 #include <llvm/ExecutionEngine/JITEventListener.h>
 #endif
 
+#if LLVM_VERSION_MAJOR < 7
 // Workaround http://llvm.org/PR23628
 #pragma pop_macro("DEBUG")
+#endif
 
 #include "c11/threads.h"
 #include "os/os_thread.h"