Skip to content

Commit c485fc5

Browse files
committed
[NFC][lld][ELF] Remove unused sec param of ObjFile<ELFT>::getRelocTarget
1 parent f19c74f commit c485fc5

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

lld/ELF/InputFiles.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ void ObjFile<ELFT>::initializeSections(bool ignoreComdats,
887887
// We handle that situation gracefully by discarding dangling relocation
888888
// sections.
889889
const uint32_t info = sec.sh_info;
890-
InputSectionBase *s = getRelocTarget(i, sec, info);
890+
InputSectionBase *s = getRelocTarget(i, info);
891891
if (!s)
892892
continue;
893893

@@ -1024,9 +1024,7 @@ void readGnuProperty(const InputSection &sec, ObjFile<ELFT> &f) {
10241024
}
10251025

10261026
template <class ELFT>
1027-
InputSectionBase *ObjFile<ELFT>::getRelocTarget(uint32_t idx,
1028-
const Elf_Shdr &sec,
1029-
uint32_t info) {
1027+
InputSectionBase *ObjFile<ELFT>::getRelocTarget(uint32_t idx, uint32_t info) {
10301028
if (info < this->sections.size()) {
10311029
InputSectionBase *target = this->sections[info];
10321030

lld/ELF/InputFiles.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,7 @@ template <class ELFT> class ObjFile : public ELFFileBase {
299299
void initializeSymbols(const llvm::object::ELFFile<ELFT> &obj);
300300
void initializeJustSymbols();
301301

302-
InputSectionBase *getRelocTarget(uint32_t idx, const Elf_Shdr &sec,
303-
uint32_t info);
302+
InputSectionBase *getRelocTarget(uint32_t idx, uint32_t info);
304303
InputSectionBase *createInputSection(uint32_t idx, const Elf_Shdr &sec,
305304
StringRef name);
306305

0 commit comments

Comments
 (0)