diff --git a/include/llvm/Object/Archive.h b/include/llvm/Object/Archive.h index a2797ad2d8e..bd1be994e18 100644 --- a/include/llvm/Object/Archive.h +++ b/include/llvm/Object/Archive.h @@ -142,7 +142,7 @@ public: , SymbolIndex(symi) , StringIndex(stri) {} StringRef getName() const; - ErrorOr getMember() const; + ErrorOr getMember() const; Symbol getNext() const; }; diff --git a/lib/Object/Archive.cpp b/lib/Object/Archive.cpp index d50a69951e1..5ac91f23035 100644 --- a/lib/Object/Archive.cpp +++ b/lib/Object/Archive.cpp @@ -402,7 +402,7 @@ StringRef Archive::Symbol::getName() const { return Parent->getSymbolTable().begin() + StringIndex; } -ErrorOr Archive::Symbol::getMember() const { +ErrorOr 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::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 {