diff options
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld.h')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld.h b/src/gallium/auxiliary/gallivm/lp_bld.h index 7ba925c4803..239c27e3c25 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld.h +++ b/src/gallium/auxiliary/gallivm/lp_bld.h @@ -95,4 +95,18 @@ typedef void *LLVMMCJITMemoryManagerRef; #define LLVMInsertBasicBlock ILLEGAL_LLVM_FUNCTION #define LLVMCreateBuilder ILLEGAL_LLVM_FUNCTION + +/* + * Before LLVM 3.4 LLVMSetAlignment only supported GlobalValue, not + * LoadInst/StoreInst as we need. + */ +#if HAVE_LLVM < 0x0304 +# ifdef __cplusplus + extern "C" +# endif + void LLVMSetAlignmentBackport(LLVMValueRef V, unsigned Bytes); +# define LLVMSetAlignment LLVMSetAlignmentBackport +#endif + + #endif /* LP_BLD_H */ |