Switch to using MaybeAlign APIs
The integer versions are deprecated
This commit is contained in:
parent
6d59017132
commit
c3ab84bb4f
1 changed files with 14 additions and 0 deletions
|
@ -1266,20 +1266,34 @@ extern "C" LLVMValueRef LLVMRustBuildMemCpy(LLVMBuilderRef B,
|
|||
LLVMValueRef Dst, unsigned DstAlign,
|
||||
LLVMValueRef Src, unsigned SrcAlign,
|
||||
LLVMValueRef Size, bool IsVolatile) {
|
||||
#if LLVM_VERSION_GE(10, 0)
|
||||
return wrap(unwrap(B)->CreateMemCpy(
|
||||
unwrap(Dst), MaybeAlign(DstAlign),
|
||||
unwrap(Src), MaybeAlign(SrcAlign),
|
||||
unwrap(Size), IsVolatile));
|
||||
#else
|
||||
return wrap(unwrap(B)->CreateMemCpy(
|
||||
unwrap(Dst), DstAlign,
|
||||
unwrap(Src), SrcAlign,
|
||||
unwrap(Size), IsVolatile));
|
||||
#endif
|
||||
}
|
||||
|
||||
extern "C" LLVMValueRef LLVMRustBuildMemMove(LLVMBuilderRef B,
|
||||
LLVMValueRef Dst, unsigned DstAlign,
|
||||
LLVMValueRef Src, unsigned SrcAlign,
|
||||
LLVMValueRef Size, bool IsVolatile) {
|
||||
#if LLVM_VERSION_GE(10, 0)
|
||||
return wrap(unwrap(B)->CreateMemMove(
|
||||
unwrap(Dst), MaybeAlign(DstAlign),
|
||||
unwrap(Src), MaybeAlign(SrcAlign),
|
||||
unwrap(Size), IsVolatile));
|
||||
#else
|
||||
return wrap(unwrap(B)->CreateMemMove(
|
||||
unwrap(Dst), DstAlign,
|
||||
unwrap(Src), SrcAlign,
|
||||
unwrap(Size), IsVolatile));
|
||||
#endif
|
||||
}
|
||||
|
||||
extern "C" LLVMValueRef
|
||||
|
|
Loading…
Reference in a new issue