Skip to content

Commit 497f879

Browse files
committed
Update CreateMemSet() usage for LLVM 10
1 parent a94fa89 commit 497f879

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/rustllvm/RustWrapper.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -1333,8 +1333,13 @@ extern "C" LLVMValueRef LLVMRustBuildMemSet(LLVMBuilderRef B,
13331333
LLVMValueRef Dst, unsigned DstAlign,
13341334
LLVMValueRef Val,
13351335
LLVMValueRef Size, bool IsVolatile) {
1336+
#if LLVM_VERSION_GE(10, 0)
1337+
return wrap(unwrap(B)->CreateMemSet(
1338+
unwrap(Dst), unwrap(Val), unwrap(Size), MaybeAlign(DstAlign), IsVolatile));
1339+
#else
13361340
return wrap(unwrap(B)->CreateMemSet(
13371341
unwrap(Dst), unwrap(Val), unwrap(Size), DstAlign, IsVolatile));
1342+
#endif
13381343
}
13391344

13401345
extern "C" LLVMValueRef

0 commit comments

Comments
 (0)