mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
gallivm: try to fix build with LLVM <= 3.4 due to missing CallSite.h
Reviewed-by: Brian Paul <brianp@vmware.com> Tested-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
f19f71830b
commit
c2a602d21a
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue