Mesa (master): llvmpipe: replace more complex 3.x version check with LLVM_VERSION_MAJOR/MINOR
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Sep 6 21:41:59 UTC 2019
Module: Mesa
Branch: master
Commit: 2406b35151c253fc5fb89ddc07dece9fdaa88ca5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2406b35151c253fc5fb89ddc07dece9fdaa88ca5
Author: Eric Engestrom <eric.engestrom at intel.com>
Date: Wed Aug 28 00:36:37 2019 +0100
llvmpipe: replace more complex 3.x version check with LLVM_VERSION_MAJOR/MINOR
Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
Acked-by: Michel Dänzer <mdaenzer at redhat.com>
---
src/gallium/drivers/llvmpipe/lp_jit.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.c b/src/gallium/drivers/llvmpipe/lp_jit.c
index dc99cc4d961..381c2610249 100644
--- a/src/gallium/drivers/llvmpipe/lp_jit.c
+++ b/src/gallium/drivers/llvmpipe/lp_jit.c
@@ -32,6 +32,7 @@
* @author Jose Fonseca <jfonseca at vmware.com>
*/
+#include <llvm/Config/llvm-config.h>
#include "util/u_memory.h"
#include "gallivm/lp_bld_init.h"
@@ -285,7 +286,7 @@ lp_jit_create_types(struct lp_fragment_shader_variant *lp)
}
if (gallivm_debug & GALLIVM_DEBUG_IR) {
-#if HAVE_LLVM >= 0x304
+#if (LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 4))
char *str = LLVMPrintModuleToString(gallivm->module);
fprintf(stderr, "%s", str);
LLVMDisposeMessage(str);
@@ -399,7 +400,7 @@ lp_jit_create_cs_types(struct lp_compute_shader_variant *lp)
}
if (gallivm_debug & GALLIVM_DEBUG_IR) {
-#if HAVE_LLVM >= 0x304
+#if (LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 4))
char *str = LLVMPrintModuleToString(gallivm->module);
fprintf(stderr, "%s", str);
LLVMDisposeMessage(str);
More information about the mesa-commit
mailing list