[llvm] r353341 - [libObject][NFC] Include filename in error message
Jordan Rupprecht via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 6 12:51:05 PST 2019
Author: rupprecht
Date: Wed Feb 6 12:51:04 2019
New Revision: 353341
URL: http://llvm.org/viewvc/llvm-project?rev=353341&view=rev
Log:
[libObject][NFC] Include filename in error message
Modified:
llvm/trunk/lib/Object/Archive.cpp
Modified: llvm/trunk/lib/Object/Archive.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/Archive.cpp?rev=353341&r1=353340&r2=353341&view=diff
==============================================================================
--- llvm/trunk/lib/Object/Archive.cpp (original)
+++ llvm/trunk/lib/Object/Archive.cpp Wed Feb 6 12:51:04 2019
@@ -511,7 +511,7 @@ Expected<MemoryBufferRef> Archive::Child
StringRef Name = NameOrErr.get();
Expected<StringRef> Buf = getBuffer();
if (!Buf)
- return Buf.takeError();
+ return createFileError(Name, Buf.takeError());
return MemoryBufferRef(*Buf, Name);
}
More information about the llvm-commits
mailing list