[lld] r277183 - Matching change needed to lld for llvm trunk change r277177.
Kevin Enderby via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 29 10:56:00 PDT 2016
Author: enderby
Date: Fri Jul 29 12:56:00 2016
New Revision: 277183
URL: http://llvm.org/viewvc/llvm-project?rev=277183&view=rev
Log:
Matching change needed to lld for llvm trunk change r277177.
Where Archive::getMemoryBufferRef() was changed to return Expected<>
Modified:
lld/trunk/lib/ReaderWriter/FileArchive.cpp
Modified: lld/trunk/lib/ReaderWriter/FileArchive.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/FileArchive.cpp?rev=277183&r1=277182&r2=277183&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/FileArchive.cpp (original)
+++ lld/trunk/lib/ReaderWriter/FileArchive.cpp Fri Jul 29 12:56:00 2016
@@ -132,9 +132,9 @@ protected:
private:
std::error_code instantiateMember(Archive::Child member,
std::unique_ptr<File> &result) const {
- ErrorOr<llvm::MemoryBufferRef> mbOrErr = member.getMemoryBufferRef();
- if (std::error_code ec = mbOrErr.getError())
- return ec;
+ Expected<llvm::MemoryBufferRef> mbOrErr = member.getMemoryBufferRef();
+ if (!mbOrErr)
+ return errorToErrorCode(mbOrErr.takeError());
llvm::MemoryBufferRef mb = mbOrErr.get();
std::string memberPath = (_archive->getFileName() + "("
+ mb.getBufferIdentifier() + ")").str();
More information about the llvm-commits
mailing list