diff options
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/MachOObjectFile.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index fd086af6d52..92981fe6b7e 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -1640,7 +1640,10 @@ void ExportEntry::moveNext() { iterator_range<export_iterator> MachOObjectFile::exports(ArrayRef<uint8_t> Trie) { ExportEntry Start(Trie); - Start.moveToFirst(); + if (Trie.size() == 0) + Start.moveToEnd(); + else + Start.moveToFirst(); ExportEntry Finish(Trie); Finish.moveToEnd(); |