Skip to content

Commit

Permalink
Update CreateMemSet() usage for LLVM 10
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Mar 19, 2020
1 parent a94fa89 commit 497f879
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/rustllvm/RustWrapper.cpp
Expand Up @@ -1333,8 +1333,13 @@ extern "C" LLVMValueRef LLVMRustBuildMemSet(LLVMBuilderRef B,
LLVMValueRef Dst, unsigned DstAlign,
LLVMValueRef Val,
LLVMValueRef Size, bool IsVolatile) {
#if LLVM_VERSION_GE(10, 0)
return wrap(unwrap(B)->CreateMemSet(
unwrap(Dst), unwrap(Val), unwrap(Size), MaybeAlign(DstAlign), IsVolatile));
#else
return wrap(unwrap(B)->CreateMemSet(
unwrap(Dst), unwrap(Val), unwrap(Size), DstAlign, IsVolatile));
#endif
}

extern "C" LLVMValueRef
Expand Down

0 comments on commit 497f879

Please sign in to comment.