[lld] r308691 - lld matching change for llvm change r308690 to add error handling to
Kevin Enderby via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 20 16:09:19 PDT 2017
Author: enderby
Date: Thu Jul 20 16:09:19 2017
New Revision: 308691
URL: http://llvm.org/viewvc/llvm-project?rev=308691&view=rev
Log:
lld matching change for llvm change r308690 to add error handling to
the dyld compact export entries in libObject.
Modified:
lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp?rev=308691&r1=308690&r2=308691&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp Thu Jul 20 16:09:19 2017
@@ -511,7 +511,8 @@ readBinary(std::unique_ptr<MemoryBuffer>
const uint8_t *trieStart = reinterpret_cast<const uint8_t *>(
start + read32(&dyldInfo->export_off, isBig));
ArrayRef<uint8_t> trie(trieStart, read32(&dyldInfo->export_size, isBig));
- for (const ExportEntry &trieExport : MachOObjectFile::exports(trie)) {
+ Error Err = Error::success();
+ for (const ExportEntry &trieExport : MachOObjectFile::exports(Err, trie)) {
Export normExport;
normExport.name = trieExport.name().copy(f->ownedAllocations);
normExport.offset = trieExport.address();
@@ -522,6 +523,8 @@ readBinary(std::unique_ptr<MemoryBuffer>
normExport.otherName = trieExport.otherName().copy(f->ownedAllocations);
f->exportInfo.push_back(normExport);
}
+ if (Err)
+ return std::move(Err);
}
}
More information about the llvm-commits
mailing list