[libObject][NFC] Include filename in error message

llvm-svn: 353341
This commit is contained in:
Jordan Rupprecht 2019-02-06 20:51:04 +00:00
parent 8c8a782f87
commit 73f628e248

View File

@ -511,7 +511,7 @@ Expected<MemoryBufferRef> Archive::Child::getMemoryBufferRef() const {
StringRef Name = NameOrErr.get(); StringRef Name = NameOrErr.get();
Expected<StringRef> Buf = getBuffer(); Expected<StringRef> Buf = getBuffer();
if (!Buf) if (!Buf)
return Buf.takeError(); return createFileError(Name, Buf.takeError());
return MemoryBufferRef(*Buf, Name); return MemoryBufferRef(*Buf, Name);
} }