diff options
| author | bors <bors@rust-lang.org> | 2020-03-24 12:42:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-03-24 12:42:54 +0000 |
| commit | 374ab25585f0a817fe7bd6986737f12347b12d0b (patch) | |
| tree | 60908a3b892fff185b7ac34e99636a1517bc9c7e /src/rustllvm/RustWrapper.cpp | |
| parent | 1add455ec6f81045e7651c6225902823f5d4fbfa (diff) | |
| parent | 497f879b1e24c369362bcd821959ffabc50a8a31 (diff) | |
| download | rust-374ab25585f0a817fe7bd6986737f12347b12d0b.tar.gz rust-374ab25585f0a817fe7bd6986737f12347b12d0b.zip | |
Auto merge of #70163 - nikic:llvm-10-preparation, r=cuviper
Prepare for LLVM 10 upgrade This is #67759 minus the submodule update. * Fix two compatibility issues in the rustllvm wrapper. * Update data layout strings in tests. * Fix LLVM version comparison (this become a problem because the major version has two digits now). r? @cuviper
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 |
