diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2020-03-02 22:37:55 +0100 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-03-19 20:09:57 +0100 |
| commit | 497f879b1e24c369362bcd821959ffabc50a8a31 (patch) | |
| tree | fa33bdc95173acbe706ffd7767d2cec5343c7409 /src/rustllvm/RustWrapper.cpp | |
| parent | a94fa896cc92d5e0678376cf5aa8b64af0899732 (diff) | |
| download | rust-497f879b1e24c369362bcd821959ffabc50a8a31.tar.gz rust-497f879b1e24c369362bcd821959ffabc50a8a31.zip | |
Update CreateMemSet() usage for LLVM 10
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
| -rw-r--r-- | src/rustllvm/RustWrapper.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index 25cfee3373d..799adb41882 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -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 |
