From b6fe1127e4b28aded8a1b0f95340e2de7dc12716 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 22 Jan 2018 17:30:22 -0800 Subject: llvm6: Remove MIPS64 archive variant It looks like LLVM also removed it in llvm-mirror/llvm@f45adc29d in favor of the name "GNU64". This was added in the thought that we'd need such a variant when adding mips64 support but we ended up not needing it! For now let's just removing the various support on the Rust side of things. --- src/rustllvm/ArchiveWrapper.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/rustllvm/ArchiveWrapper.cpp') diff --git a/src/rustllvm/ArchiveWrapper.cpp b/src/rustllvm/ArchiveWrapper.cpp index b110013ceae..d185da9c2f8 100644 --- a/src/rustllvm/ArchiveWrapper.cpp +++ b/src/rustllvm/ArchiveWrapper.cpp @@ -42,7 +42,6 @@ struct RustArchiveIterator { enum class LLVMRustArchiveKind { Other, GNU, - MIPS64, BSD, COFF, }; @@ -51,8 +50,6 @@ static Archive::Kind fromRust(LLVMRustArchiveKind Kind) { switch (Kind) { case LLVMRustArchiveKind::GNU: return Archive::K_GNU; - case LLVMRustArchiveKind::MIPS64: - return Archive::K_MIPS64; case LLVMRustArchiveKind::BSD: return Archive::K_BSD; case LLVMRustArchiveKind::COFF: -- cgit 1.4.1-3-g733a5 From caedb36f081334451ba83e9524af025891208592 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 22 Jan 2018 17:59:27 -0800 Subject: llvm6: Different return value for writeArchive Updated in llvm-mirror/llvm@203c90ba this function now just returns an `Error`, so this updates the C++ bindings accordingly --- src/rustllvm/ArchiveWrapper.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/rustllvm/ArchiveWrapper.cpp') diff --git a/src/rustllvm/ArchiveWrapper.cpp b/src/rustllvm/ArchiveWrapper.cpp index d185da9c2f8..93157cd6819 100644 --- a/src/rustllvm/ArchiveWrapper.cpp +++ b/src/rustllvm/ArchiveWrapper.cpp @@ -232,9 +232,16 @@ LLVMRustWriteArchive(char *Dst, size_t NumMembers, Members.push_back(std::move(*MOrErr)); } } - auto Pair = writeArchive(Dst, Members, WriteSymbtab, Kind, true, false); - if (!Pair.second) + auto Result = writeArchive(Dst, Members, WriteSymbtab, Kind, true, false); +#if LLVM_VERSION_GE(6, 0) + if (!Result) return LLVMRustResult::Success; - LLVMRustSetLastError(Pair.second.message().c_str()); + LLVMRustSetLastError(toString(std::move(Result)).c_str()); +#else + if (!Result.second) + return LLVMRustResult::Success; + LLVMRustSetLastError(Result.second.message().c_str()); +#endif + return LLVMRustResult::Failure; } -- cgit 1.4.1-3-g733a5