[LLVM-3.9] Update return type for Archive::create
Changed in
0b21d88fd3
This commit is contained in:
parent
8433f9bb33
commit
dbb4178f4e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user