提交 dbb4178f 编写于 作者: J Jan-Erik Rediger

[LLVM-3.9] Update return type for Archive::create

Changed in
https://github.com/rust-lang/llvm/commit/0b21d88fd31b4bfb6fdb7e2f1ed5f93639d5bd1c
上级 8433f9bb
......@@ -43,11 +43,19 @@ LLVMRustOpenArchive(char *path) {
return nullptr;
}
#if LLVM_VERSION_MINOR <= 8
ErrorOr<std::unique_ptr<Archive>> archive_or =
#else
Expected<std::unique_ptr<Archive>> archive_or =
#endif
Archive::create(buf_or.get()->getMemBufferRef());
if (!archive_or) {
#if LLVM_VERSION_MINOR <= 8
LLVMRustSetLastError(archive_or.getError().message().c_str());
#else
LLVMRustSetLastError(toString(archive_or.takeError()).c_str());
#endif
return nullptr;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册