diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-01-17 17:29:21 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-01-17 17:29:21 -0500 |
| commit | 4aed7ea6f89a091aede10ccf0fb45b3ce12c710d (patch) | |
| tree | 1e29f13ad17bfc841c33f6ac3d0ccb092404f409 /deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp | |
| parent | 48cd808185f54e935714539d101585a9a0a41673 (diff) | |
| download | zig-4aed7ea6f89a091aede10ccf0fb45b3ce12c710d.tar.gz zig-4aed7ea6f89a091aede10ccf0fb45b3ce12c710d.zip | |
update embedded LLD to 6.0.0rc1
Diffstat (limited to 'deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp')
| -rw-r--r-- | deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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<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); } } |
