This never returns end(), simplify to use Child instead of iterator. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251876 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2015-11-03 01:20:44 +00:00
parent 55861d07e0
commit 2356f2b5d9
2 changed files with 3 additions and 4 deletions

View File

@ -142,7 +142,7 @@ public:
, SymbolIndex(symi)
, StringIndex(stri) {}
StringRef getName() const;
ErrorOr<child_iterator> getMember() const;
ErrorOr<Child> getMember() const;
Symbol getNext() const;
};

View File

@ -402,7 +402,7 @@ StringRef Archive::Symbol::getName() const {
return Parent->getSymbolTable().begin() + StringIndex;
}
ErrorOr<Archive::child_iterator> Archive::Symbol::getMember() const {
ErrorOr<Archive::Child> Archive::Symbol::getMember() const {
const char *Buf = Parent->getSymbolTable().begin();
const char *Offsets = Buf;
if (Parent->kind() == K_MIPS64)
@ -447,8 +447,7 @@ ErrorOr<Archive::child_iterator> Archive::Symbol::getMember() const {
}
const char *Loc = Parent->getData().begin() + Offset;
child_iterator Iter(Child(Parent, Loc));
return Iter;
return Child(Parent, Loc);
}
Archive::Symbol Archive::Symbol::getNext() const {