summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2017-07-20 23:09:19 +0000
committerKevin Enderby <enderby@apple.com>2017-07-20 23:09:19 +0000
commitb4c351dfd1d07ca7aa3f8e1c9fa25588d95b8638 (patch)
treec496b8d655d470c7cbd55c5a6c9838e7fa5f21b4 /lld/lib/ReaderWriter
parent3e95bd2239236df3e1417519d7fdae6b72c94c4e (diff)
downloadbcm5719-llvm-b4c351dfd1d07ca7aa3f8e1c9fa25588d95b8638.tar.gz
bcm5719-llvm-b4c351dfd1d07ca7aa3f8e1c9fa25588d95b8638.zip
lld matching change for llvm change r308690 to add error handling to
the dyld compact export entries in libObject. llvm-svn: 308691
Diffstat (limited to 'lld/lib/ReaderWriter')
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
index b54054726df..2f91818f187 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
@@ -511,7 +511,8 @@ readBinary(std::unique_ptr<MemoryBuffer> &mb,
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> &mb,
normExport.otherName = trieExport.otherName().copy(f->ownedAllocations);
f->exportInfo.push_back(normExport);
}
+ if (Err)
+ return std::move(Err);
}
}
OpenPOWER on IntegriCloud