[lld] r265386 - Remove redundant argument. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 5 04:47:47 PDT 2016
Author: rafael
Date: Tue Apr 5 06:47:46 2016
New Revision: 265386
URL: http://llvm.org/viewvc/llvm-project?rev=265386&view=rev
Log:
Remove redundant argument. NFC.
Modified:
lld/trunk/ELF/InputFiles.cpp
lld/trunk/ELF/Symbols.cpp
lld/trunk/ELF/Symbols.h
Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=265386&r1=265385&r2=265386&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Tue Apr 5 06:47:46 2016
@@ -306,13 +306,12 @@ elf::ObjectFile<ELFT>::getSection(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));
Modified: lld/trunk/ELF/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=265386&r1=265385&r2=265386&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.cpp (original)
+++ lld/trunk/ELF/Symbols.cpp Tue Apr 5 06:47:46 2016
@@ -261,7 +261,7 @@ UndefinedElf<ELFT>::UndefinedElf(StringR
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) {
Modified: lld/trunk/ELF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=265386&r1=265385&r2=265386&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.h (original)
+++ lld/trunk/ELF/Symbols.h Tue Apr 5 06:47:46 2016
@@ -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:
UndefinedElf(StringRef N, const Elf_Sym &Sym);
- UndefinedElf(uint32_t NameOffset, const Elf_Sym &Sym);
+ UndefinedElf(const Elf_Sym &Sym);
uintX_t Size;
More information about the llvm-commits
mailing list