summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-04-05 11:47:46 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-04-05 11:47:46 +0000
commitd9a1717efc2e4d17661d4d2b8f8306421213605b (patch)
tree684f8ec3f76808896eda54ac191548056355c429
parent94b1bdf91a6565dd7e6a51343fcb5fbdf25f1725 (diff)
downloadbcm5719-llvm-d9a1717efc2e4d17661d4d2b8f8306421213605b.tar.gz
bcm5719-llvm-d9a1717efc2e4d17661d4d2b8f8306421213605b.zip
Remove redundant argument. NFC.
llvm-svn: 265386
-rw-r--r--lld/ELF/InputFiles.cpp7
-rw-r--r--lld/ELF/Symbols.cpp2
-rw-r--r--lld/ELF/Symbols.h7
3 files changed, 7 insertions, 9 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index fcc38f675d0..e58814de57a 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -306,13 +306,12 @@ elf::ObjectFile<ELFT>::getSection(const Elf_Sym &Sym) const {
template <class ELFT>
SymbolBody *elf::ObjectFile<ELFT>::createSymbolBody(const Elf_Sym *Sym) {
- uint32_t NameOffset = Sym->st_name;
- unsigned char Binding = Sym->getBinding();
+ unsigned char Binding = Sym->getBinding();
InputSectionBase<ELFT> *Sec = getSection(*Sym);
if (Binding == STB_LOCAL) {
if (Sym->st_shndx == SHN_UNDEF)
- return new (Alloc) UndefinedElf<ELFT>(NameOffset, *Sym);
- return new (Alloc) DefinedRegular<ELFT>(NameOffset, *Sym, Sec);
+ return new (Alloc) UndefinedElf<ELFT>(*Sym);
+ return new (Alloc) DefinedRegular<ELFT>(*Sym, Sec);
}
StringRef Name = check(Sym->getName(this->StringTable));
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp
index cdf99791ac5..05402caa94b 100644
--- a/lld/ELF/Symbols.cpp
+++ b/lld/ELF/Symbols.cpp
@@ -261,7 +261,7 @@ UndefinedElf<ELFT>::UndefinedElf(StringRef N, const Elf_Sym &Sym)
Size(Sym.st_size) {}
template <typename ELFT>
-UndefinedElf<ELFT>::UndefinedElf(uint32_t NameOffset, const Elf_Sym &Sym)
+UndefinedElf<ELFT>::UndefinedElf(const Elf_Sym &Sym)
: Undefined(SymbolBody::UndefinedElfKind, NameOffset, Sym.st_other,
Sym.getType()),
Size(Sym.st_size) {
diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h
index 5327b8c0d61..72d7d81425d 100644
--- a/lld/ELF/Symbols.h
+++ b/lld/ELF/Symbols.h
@@ -225,9 +225,8 @@ public:
Value(Sym.st_value), Size(Sym.st_size),
Section(Section ? Section->Repl : NullInputSection) {}
- DefinedRegular(uint32_t NameOffset, const Elf_Sym &Sym,
- InputSectionBase<ELFT> *Section)
- : Defined(SymbolBody::DefinedRegularKind, NameOffset, Sym.st_other,
+ DefinedRegular(const Elf_Sym &Sym, InputSectionBase<ELFT> *Section)
+ : Defined(SymbolBody::DefinedRegularKind, Sym.st_name, Sym.st_other,
Sym.getType()),
Value(Sym.st_value), Size(Sym.st_size),
Section(Section ? Section->Repl : NullInputSection) {
@@ -307,7 +306,7 @@ template <class ELFT> class UndefinedElf : public Undefined {
public:
UndefinedElf(StringRef N, const Elf_Sym &Sym);
- UndefinedElf(uint32_t NameOffset, const Elf_Sym &Sym);
+ UndefinedElf(const Elf_Sym &Sym);
uintX_t Size;
OpenPOWER on IntegriCloud