[lld] r252718 - Don't pass a member variable to a method. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 11 02:23:32 PST 2015
Author: rafael
Date: Wed Nov 11 04:23:32 2015
New Revision: 252718
URL: http://llvm.org/viewvc/llvm-project?rev=252718&view=rev
Log:
Don't pass a member variable to a method. NFC.
Modified:
lld/trunk/ELF/InputSection.cpp
lld/trunk/ELF/InputSection.h
Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=252718&r1=252717&r2=252718&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Wed Nov 11 04:23:32 2015
@@ -84,8 +84,7 @@ template <class ELFT>
template <bool isRela>
void InputSectionBase<ELFT>::relocate(
uint8_t *Buf, uint8_t *BufEnd,
- iterator_range<const Elf_Rel_Impl<ELFT, isRela> *> Rels,
- const ObjectFile<ELFT> &File, uintX_t BaseAddr) {
+ iterator_range<const Elf_Rel_Impl<ELFT, isRela> *> Rels, uintX_t BaseAddr) {
typedef Elf_Rel_Impl<ELFT, isRela> RelType;
for (const RelType &RI : Rels) {
uint32_t SymIndex = RI.getSymbol(Config->Mips64EL);
@@ -103,14 +102,14 @@ void InputSectionBase<ELFT>::relocate(
// Handle relocations for local symbols -- they never get
// resolved so we don't allocate a SymbolBody.
- const Elf_Shdr *SymTab = File.getSymbolTable();
+ const Elf_Shdr *SymTab = File->getSymbolTable();
if (SymIndex < SymTab->sh_info) {
- uintX_t SymVA = getLocalRelTarget(File, RI);
+ uintX_t SymVA = getLocalRelTarget(*File, RI);
Target->relocateOne(BufLoc, BufEnd, Type, AddrLoc, SymVA);
continue;
}
- SymbolBody &Body = *File.getSymbolBody(SymIndex)->repl();
+ SymbolBody &Body = *File->getSymbolBody(SymIndex)->repl();
uintX_t SymVA = getSymVA<ELFT>(Body);
if (Target->relocNeedsPlt(Type, Body)) {
SymVA = Out<ELFT>::Plt->getEntryAddr(Body);
@@ -143,11 +142,9 @@ template <class ELFT> void InputSection<
// Iterate over all relocation sections that apply to this section.
for (const Elf_Shdr *RelSec : RelocSections) {
if (RelSec->sh_type == SHT_RELA)
- this->relocate(Base, Base + Data.size(), EObj.relas(RelSec), *this->File,
- BaseAddr);
+ this->relocate(Base, Base + Data.size(), EObj.relas(RelSec), BaseAddr);
else
- this->relocate(Base, Base + Data.size(), EObj.rels(RelSec), *this->File,
- BaseAddr);
+ this->relocate(Base, Base + Data.size(), EObj.rels(RelSec), BaseAddr);
}
}
Modified: lld/trunk/ELF/InputSection.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.h?rev=252718&r1=252717&r2=252718&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.h (original)
+++ lld/trunk/ELF/InputSection.h Wed Nov 11 04:23:32 2015
@@ -74,7 +74,7 @@ public:
void relocate(uint8_t *Buf, uint8_t *BufEnd,
llvm::iterator_range<
const llvm::object::Elf_Rel_Impl<ELFT, isRela> *> Rels,
- const ObjectFile<ELFT> &File, uintX_t BaseAddr);
+ uintX_t BaseAddr);
};
template <class ELFT>
More information about the llvm-commits
mailing list