From 4aed7ea6f89a091aede10ccf0fb45b3ce12c710d Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 17 Jan 2018 17:29:21 -0500 Subject: update embedded LLD to 6.0.0rc1 --- .../lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp') diff --git a/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp b/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp index b54054726d..7c2e833c09 100644 --- a/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp +++ b/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp @@ -24,8 +24,8 @@ #include "ArchHandler.h" #include "MachONormalizedFile.h" #include "MachONormalizedFileBinaryUtils.h" +#include "lld/Common/LLVM.h" #include "lld/Core/Error.h" -#include "lld/Core/LLVM.h" #include "lld/Core/SharedLibraryFile.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallString.h" @@ -511,7 +511,8 @@ readBinary(std::unique_ptr &mb, const uint8_t *trieStart = reinterpret_cast( start + read32(&dyldInfo->export_off, isBig)); ArrayRef 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 &mb, normExport.otherName = trieExport.otherName().copy(f->ownedAllocations); f->exportInfo.push_back(normExport); } + if (Err) + return std::move(Err); } } -- cgit v1.2.3