Skip to content

Commit aed9cf3

Browse files
committed
Update CreateMemSet() usage for LLVM 10
1 parent 724b7ee commit aed9cf3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/rustllvm/RustWrapper.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,8 +1300,13 @@ extern "C" LLVMValueRef LLVMRustBuildMemSet(LLVMBuilderRef B,
13001300
LLVMValueRef Dst, unsigned DstAlign,
13011301
LLVMValueRef Val,
13021302
LLVMValueRef Size, bool IsVolatile) {
1303+
#if LLVM_VERSION_GE(10, 0)
1304+
return wrap(unwrap(B)->CreateMemSet(
1305+
unwrap(Dst), unwrap(Val), unwrap(Size), MaybeAlign(DstAlign), IsVolatile));
1306+
#else
13031307
return wrap(unwrap(B)->CreateMemSet(
13041308
unwrap(Dst), unwrap(Val), unwrap(Size), DstAlign, IsVolatile));
1309+
#endif
13051310
}
13061311

13071312
extern "C" LLVMValueRef

0 commit comments

Comments
 (0)