summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/InputFiles.cpp7
-rw-r--r--lld/ELF/InputFiles.h2
2 files changed, 4 insertions, 5 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index 867cc497f06..b43a9b39309 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -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;
diff --git a/lld/ELF/InputFiles.h b/lld/ELF/InputFiles.h
index 45d403c0125..f28a0ab2f72 100644
--- a/lld/ELF/InputFiles.h
+++ b/lld/ELF/InputFiles.h
@@ -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;
OpenPOWER on IntegriCloud