git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143695
91177308-0d34-0410-b5e6-
96231b3b80d8
Archive::Symbol Archive::Symbol::getNext() const {
Symbol t(*this);
- const char *buf = Parent->SymbolTable->getBuffer()->getBufferStart();
- buf += t.StringIndex;
- while (*buf++); // Go to one past next null.
- t.StringIndex = buf - Parent->SymbolTable->getBuffer()->getBufferStart();
+ // Go to one past next null.
+ t.StringIndex =
+ Parent->SymbolTable->getBuffer()->getBuffer().find('\0', t.StringIndex) + 1;
++t.SymbolIndex;
return t;
}