forked from OSchip/llvm-project
Needed change to lld for the change to createBinary() now returning Expected<...>
With the llvm change in r265606 this is the matching needed change to the lld code now that createBinary() is returning Expected<...> . llvm-svn: 265607
This commit is contained in:
parent
3fcdf6ae2a
commit
439453679c
|
@ -93,7 +93,9 @@ MemoryBufferRef ArchiveFile::getMember(const Archive::Symbol *Sym) {
|
|||
void ObjectFile::parse() {
|
||||
// Parse a memory buffer as a COFF file.
|
||||
auto BinOrErr = createBinary(MB);
|
||||
error(BinOrErr, "Failed to parse object file");
|
||||
if (!BinOrErr)
|
||||
error(errorToErrorCode(BinOrErr.takeError()),
|
||||
"Failed to parse object file");
|
||||
std::unique_ptr<Binary> Bin = std::move(*BinOrErr);
|
||||
|
||||
if (auto *Obj = dyn_cast<COFFObjectFile>(Bin.get())) {
|
||||
|
|
Loading…
Reference in New Issue