forked from OSchip/llvm-project
Simplify function signature. NFC.
StringTable is a member variable, so we don't need to pass it around. llvm-svn: 258382
This commit is contained in:
parent
8cc30787b0
commit
c5e372db40
|
@ -266,7 +266,7 @@ template <class ELFT> void ObjectFile<ELFT>::initializeSymbols() {
|
|||
uint32_t NumSymbols = std::distance(Syms.begin(), Syms.end());
|
||||
SymbolBodies.reserve(NumSymbols);
|
||||
for (const Elf_Sym &Sym : Syms)
|
||||
SymbolBodies.push_back(createSymbolBody(this->StringTable, &Sym));
|
||||
SymbolBodies.push_back(createSymbolBody(&Sym));
|
||||
}
|
||||
|
||||
template <class ELFT>
|
||||
|
@ -281,9 +281,8 @@ ObjectFile<ELFT>::getSection(const Elf_Sym &Sym) const {
|
|||
}
|
||||
|
||||
template <class ELFT>
|
||||
SymbolBody *ObjectFile<ELFT>::createSymbolBody(StringRef StringTable,
|
||||
const Elf_Sym *Sym) {
|
||||
ErrorOr<StringRef> NameOrErr = Sym->getName(StringTable);
|
||||
SymbolBody *ObjectFile<ELFT>::createSymbolBody(const Elf_Sym *Sym) {
|
||||
ErrorOr<StringRef> NameOrErr = Sym->getName(this->StringTable);
|
||||
error(NameOrErr);
|
||||
StringRef Name = *NameOrErr;
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ private:
|
|||
void initializeSymbols();
|
||||
InputSectionBase<ELFT> *createInputSection(const Elf_Shdr &Sec);
|
||||
|
||||
SymbolBody *createSymbolBody(StringRef StringTable, const Elf_Sym *Sym);
|
||||
SymbolBody *createSymbolBody(const Elf_Sym *Sym);
|
||||
|
||||
// List of all sections defined by this file.
|
||||
std::vector<InputSectionBase<ELFT> *> Sections;
|
||||
|
|
Loading…
Reference in New Issue