[Object] Don't crash on empty export lists.
Summary: This fixes the exports iterator if the export list is empty. Reviewers: Bigcheese, kledzik Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6732 llvm-svn: 224563
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user