summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-01-21 02:10:12 +0000
committerRui Ueyama <ruiu@google.com>2016-01-21 02:10:12 +0000
commitc5e372db40bcc9da47cea4499e65ca6818bfc08e (patch)
treed1360b5040d38d6ab022ad94245712d70682e7c4
parent8cc30787b091712e4ff834efc329c5756208d1f8 (diff)
downloadbcm5719-llvm-c5e372db40bcc9da47cea4499e65ca6818bfc08e.tar.gz
bcm5719-llvm-c5e372db40bcc9da47cea4499e65ca6818bfc08e.zip
Simplify function signature. NFC.
StringTable is a member variable, so we don't need to pass it around. llvm-svn: 258382
-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