[lld] r267603 - Call repl in getSymbolBody. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 26 13:45:31 PDT 2016
Author: rafael
Date: Tue Apr 26 15:45:31 2016
New Revision: 267603
URL: http://llvm.org/viewvc/llvm-project?rev=267603&view=rev
Log:
Call repl in getSymbolBody. NFC.
Every caller was doing it.
Modified:
lld/trunk/ELF/ICF.cpp
lld/trunk/ELF/InputFiles.h
lld/trunk/ELF/InputSection.cpp
lld/trunk/ELF/OutputSections.cpp
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/ICF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/ICF.cpp?rev=267603&r1=267602&r2=267603&view=diff
==============================================================================
--- lld/trunk/ELF/ICF.cpp (original)
+++ lld/trunk/ELF/ICF.cpp Tue Apr 26 15:45:31 2016
@@ -162,7 +162,7 @@ template <class ELFT>
SymbolBody &ICF<ELFT>::getSymbol(const InputSection<ELFT> *Sec,
const Elf_Rel *Rel) {
uint32_t SymIdx = Rel->getSymbol(Config->Mips64EL);
- return Sec->File->getSymbolBody(SymIdx).repl();
+ return Sec->File->getSymbolBody(SymIdx);
}
// All sections between Begin and End must have the same group ID before
Modified: lld/trunk/ELF/InputFiles.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.h?rev=267603&r1=267602&r2=267603&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.h (original)
+++ lld/trunk/ELF/InputFiles.h Tue Apr 26 15:45:31 2016
@@ -124,7 +124,7 @@ public:
InputSectionBase<ELFT> *getSection(const Elf_Sym &Sym) const;
SymbolBody &getSymbolBody(uint32_t SymbolIndex) const {
- return *SymbolBodies[SymbolIndex];
+ return SymbolBodies[SymbolIndex]->repl();
}
const Elf_Shdr *getSymbolTable() const { return this->Symtab; };
Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=267603&r1=267602&r2=267603&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Tue Apr 26 15:45:31 2016
@@ -81,7 +81,7 @@ template <class ELFT>
static DefinedRegular<ELFT> *getRelocTargetSym(elf::ObjectFile<ELFT> *File,
const typename ELFT::Rel &Rel) {
uint32_t SymIndex = Rel.getSymbol(Config->Mips64EL);
- SymbolBody &B = File->getSymbolBody(SymIndex).repl();
+ SymbolBody &B = File->getSymbolBody(SymIndex);
if (auto *D = dyn_cast<DefinedRegular<ELFT>>(&B))
if (D->Section)
return D;
@@ -155,7 +155,7 @@ void InputSection<ELFT>::copyRelocations
for (const RelTy &Rel : Rels) {
uint32_t SymIndex = Rel.getSymbol(Config->Mips64EL);
uint32_t Type = Rel.getType(Config->Mips64EL);
- SymbolBody &Body = this->File->getSymbolBody(SymIndex).repl();
+ SymbolBody &Body = this->File->getSymbolBody(SymIndex);
RelTy *P = reinterpret_cast<RelTy *>(Buf);
Buf += sizeof(RelTy);
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=267603&r1=267602&r2=267603&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Tue Apr 26 15:45:31 2016
@@ -1139,7 +1139,7 @@ void EHOutputSection<ELFT>::addSectionAu
SymbolBody *Personality = nullptr;
if (HasReloc) {
uint32_t SymIndex = RelI->getSymbol(Config->Mips64EL);
- Personality = &S->getFile()->getSymbolBody(SymIndex).repl();
+ Personality = &S->getFile()->getSymbolBody(SymIndex);
}
std::pair<StringRef, SymbolBody *> CieInfo(Entry, Personality);
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=267603&r1=267602&r2=267603&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Tue Apr 26 15:45:31 2016
@@ -362,7 +362,7 @@ void Writer<ELFT>::scanRelocsForThunks(c
for (const RelTy &RI : Rels) {
uint32_t Type = RI.getType(Config->Mips64EL);
uint32_t SymIndex = RI.getSymbol(Config->Mips64EL);
- SymbolBody &Body = File.getSymbolBody(SymIndex).repl();
+ SymbolBody &Body = File.getSymbolBody(SymIndex);
if (Body.hasThunk() || !Target->needsThunk(Type, File, Body))
continue;
auto *D = cast<DefinedRegular<ELFT>>(&Body);
@@ -521,7 +521,7 @@ void Writer<ELFT>::scanRelocs(InputSecti
for (auto I = Rels.begin(), E = Rels.end(); I != E; ++I) {
const RelTy &RI = *I;
uint32_t SymIndex = RI.getSymbol(Config->Mips64EL);
- SymbolBody &Body = File.getSymbolBody(SymIndex).repl();
+ SymbolBody &Body = File.getSymbolBody(SymIndex);
uint32_t Type = RI.getType(Config->Mips64EL);
// Ignore "hint" relocation because it is for optional code optimization.
More information about the llvm-commits
mailing list