diff options
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index f4045ad1d89..bd4d4d3c094 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -77,7 +77,9 @@ #include <llvm/Support/TargetSelect.h> +#if HAVE_LLVM >= 0x0305 #include <llvm/IR/CallSite.h> +#endif #include <llvm/IR/IRBuilder.h> #include <llvm/IR/Module.h> #include <llvm/Support/CBindingWrapping.h> @@ -715,8 +717,10 @@ lp_get_called_value(LLVMValueRef call) { #if HAVE_LLVM >= 0x0309 return LLVMGetCalledValue(call); -#else +#elif HAVE_LLVM >= 0x0305 return llvm::wrap(llvm::CallSite(llvm::unwrap<llvm::Instruction>(call)).getCalledValue()); +#else + return NULL; /* radeonsi doesn't support so old LLVM. */ #endif } |