diff options
| author | bors <bors@rust-lang.org> | 2020-01-13 04:01:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-01-13 04:01:00 +0000 |
| commit | e82febc78e5a14356de5f713b904eebef1e86956 (patch) | |
| tree | e1c8bffd16e5b0f003d8d9d61415cfb72a2549c7 /src/rustllvm/ArchiveWrapper.cpp | |
| parent | 3ebcfa1451cfedc13a07e6353d8ade9742dfdc2a (diff) | |
| parent | c9e996f05cff70e69240b9a9d2d56e57af21eb3a (diff) | |
| download | rust-e82febc78e5a14356de5f713b904eebef1e86956.tar.gz rust-e82febc78e5a14356de5f713b904eebef1e86956.zip | |
Auto merge of #67900 - nikic:prepare-llvm-10, r=nagisa
Prepare for LLVM 10 upgrade Split off from #67759, this just adds the necessary compatibility bits and updates codegen tests, without performing the actual LLVM upgrade. r? @alexcrichton
Diffstat (limited to 'src/rustllvm/ArchiveWrapper.cpp')
| -rw-r--r-- | src/rustllvm/ArchiveWrapper.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rustllvm/ArchiveWrapper.cpp b/src/rustllvm/ArchiveWrapper.cpp index dd0111d3f2c..678d787571e 100644 --- a/src/rustllvm/ArchiveWrapper.cpp +++ b/src/rustllvm/ArchiveWrapper.cpp @@ -89,7 +89,11 @@ extern "C" void LLVMRustDestroyArchive(LLVMRustArchiveRef RustArchive) { extern "C" LLVMRustArchiveIteratorRef LLVMRustArchiveIteratorNew(LLVMRustArchiveRef RustArchive) { Archive *Archive = RustArchive->getBinary(); +#if LLVM_VERSION_GE(10, 0) + std::unique_ptr<Error> Err = std::make_unique<Error>(Error::success()); +#else std::unique_ptr<Error> Err = llvm::make_unique<Error>(Error::success()); +#endif auto Cur = Archive->child_begin(*Err); if (*Err) { LLVMRustSetLastError(toString(std::move(*Err)).c_str()); |
