[Mesa-dev] [PATCH 1/1] gallivm: Fix build after llvm r328839

Jan Vesely jan.vesely at rutgers.edu
Fri Mar 30 16:30:34 UTC 2018


LLVM r328839 moved few function declrations to a new Utils.h header.
Fixes:
gallivm/lp_bld_init.c:145:7: error: implicit declaration of function ‘LLVMAddPromoteMemoryToRegisterPass’; did you mean ‘LLVMAddDemoteMemoryToRegisterPass’?

Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
 src/gallium/auxiliary/gallivm/lp_bld_init.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index 6ddc509a81..dae9d01552 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -40,6 +40,9 @@
 
 #include <llvm-c/Analysis.h>
 #include <llvm-c/Transforms/Scalar.h>
+#if HAVE_LLVM >= 0x0700
+#include <llvm-c/Transforms/Utils.h>
+#endif
 #include <llvm-c/BitWriter.h>
 
 
-- 
2.14.3



More information about the mesa-dev mailing list