radeon: fix r600 builds when old version of llvm is present
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 23 Feb 2017 02:35:03 +0000 (13:35 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Thu, 23 Feb 2017 03:05:55 +0000 (14:05 +1100)
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
src/gallium/drivers/radeon/r600_pipe_common.c

index bae6d6fb3dab3a87fc73491bd0f86c191c43dc5d..9a514e34b3fdde722b45b51494925a8ea9205121 100644 (file)
@@ -43,7 +43,7 @@
 #define HAVE_LLVM 0
 #endif
 
-#if HAVE_LLVM
+#if HAVE_LLVM >= 0x0306
 #include <llvm-c/TargetMachine.h>
 #endif
 
@@ -793,7 +793,7 @@ static void r600_disk_cache_create(struct r600_common_screen *rscreen)
                if (rscreen->chip_class < SI) {
                        res = asprintf(&timestamp_str, "%u",mesa_timestamp);
                }
-#if HAVE_LLVM
+#if HAVE_LLVM >= 0x0306
                else {
                        uint32_t llvm_timestamp;
                        if (disk_cache_get_function_timestamp(LLVMInitializeAMDGPUTargetInfo,