@@ -353,11 +353,11 @@ Archive::child_iterator Archive::child_end() const {
353
353
}
354
354
355
355
StringRef Archive::Symbol::getName () const {
356
- return Parent->SymbolTable -> getBuffer ().begin () + StringIndex;
356
+ return Parent->getSymbolTable ().begin () + StringIndex;
357
357
}
358
358
359
359
ErrorOr<Archive::child_iterator> Archive::Symbol::getMember () const {
360
- const char *Buf = Parent->SymbolTable -> getBuffer ().begin ();
360
+ const char *Buf = Parent->getSymbolTable ().begin ();
361
361
const char *Offsets = Buf;
362
362
if (Parent->kind () == K_MIPS64)
363
363
Offsets += sizeof (uint64_t );
@@ -421,7 +421,7 @@ Archive::Symbol Archive::Symbol::getNext() const {
421
421
// and the second being the offset into the archive of the member that
422
422
// define the symbol. After that the next uint32_t is the byte count of
423
423
// the string table followed by the string table.
424
- const char *Buf = Parent->SymbolTable -> getBuffer ().begin ();
424
+ const char *Buf = Parent->getSymbolTable ().begin ();
425
425
uint32_t RanlibCount = 0 ;
426
426
RanlibCount = read32le (Buf) / 8 ;
427
427
// If t.SymbolIndex + 1 will be past the count of symbols (the RanlibCount)
@@ -438,8 +438,7 @@ Archive::Symbol Archive::Symbol::getNext() const {
438
438
}
439
439
} else {
440
440
// Go to one past next null.
441
- t.StringIndex =
442
- Parent->SymbolTable ->getBuffer ().find (' \0 ' , t.StringIndex ) + 1 ;
441
+ t.StringIndex = Parent->getSymbolTable ().find (' \0 ' , t.StringIndex ) + 1 ;
443
442
}
444
443
++t.SymbolIndex ;
445
444
return t;
@@ -449,7 +448,7 @@ Archive::symbol_iterator Archive::symbol_begin() const {
449
448
if (!hasSymbolTable ())
450
449
return symbol_iterator (Symbol (this , 0 , 0 ));
451
450
452
- const char *buf = SymbolTable-> getBuffer ().begin ();
451
+ const char *buf = getSymbolTable ().begin ();
453
452
if (kind () == K_GNU) {
454
453
uint32_t symbol_count = 0 ;
455
454
symbol_count = read32be (buf);
@@ -481,7 +480,7 @@ Archive::symbol_iterator Archive::symbol_begin() const {
481
480
symbol_count = read32le (buf);
482
481
buf += 4 + (symbol_count * 2 ); // Skip indices.
483
482
}
484
- uint32_t string_start_offset = buf - SymbolTable-> getBuffer ().begin ();
483
+ uint32_t string_start_offset = buf - getSymbolTable ().begin ();
485
484
return symbol_iterator (Symbol (this , 0 , string_start_offset));
486
485
}
487
486
@@ -492,7 +491,7 @@ Archive::symbol_iterator Archive::symbol_end() const {
492
491
}
493
492
494
493
uint32_t Archive::getNumberOfSymbols () const {
495
- const char *buf = SymbolTable-> getBuffer ().begin ();
494
+ const char *buf = getSymbolTable ().begin ();
496
495
if (kind () == K_GNU)
497
496
return read32be (buf);
498
497
if (kind () == K_MIPS64)
0 commit comments