[lld] 65f9601 - [NFC][lld][ELF] Remove unused `sec` param of `ObjFile<ELFT>::getRelocTarget` (#96500)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 25 03:49:55 PDT 2024
Author: Daniil Kovalev
Date: 2024-06-25T13:49:51+03:00
New Revision: 65f9601fb1479507820ca8381bb472ec4e8a2eee
URL: https://github.com/llvm/llvm-project/commit/65f9601fb1479507820ca8381bb472ec4e8a2eee
DIFF: https://github.com/llvm/llvm-project/commit/65f9601fb1479507820ca8381bb472ec4e8a2eee.diff
LOG: [NFC][lld][ELF] Remove unused `sec` param of `ObjFile<ELFT>::getRelocTarget` (#96500)
Added:
Modified:
lld/ELF/InputFiles.cpp
lld/ELF/InputFiles.h
Removed:
################################################################################
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index e52d6444c64f2..03ff4eadfe670 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -887,7 +887,7 @@ void ObjFile<ELFT>::initializeSections(bool ignoreComdats,
// We handle that situation gracefully by discarding dangling relocation
// sections.
const uint32_t info = sec.sh_info;
- InputSectionBase *s = getRelocTarget(i, sec, info);
+ InputSectionBase *s = getRelocTarget(i, info);
if (!s)
continue;
@@ -1024,9 +1024,7 @@ void readGnuProperty(const InputSection &sec, ObjFile<ELFT> &f) {
}
template <class ELFT>
-InputSectionBase *ObjFile<ELFT>::getRelocTarget(uint32_t idx,
- const Elf_Shdr &sec,
- uint32_t info) {
+InputSectionBase *ObjFile<ELFT>::getRelocTarget(uint32_t idx, uint32_t info) {
if (info < this->sections.size()) {
InputSectionBase *target = this->sections[info];
diff --git a/lld/ELF/InputFiles.h b/lld/ELF/InputFiles.h
index 834b3b63dd83b..0617f41e1e13a 100644
--- a/lld/ELF/InputFiles.h
+++ b/lld/ELF/InputFiles.h
@@ -299,8 +299,7 @@ template <class ELFT> class ObjFile : public ELFFileBase {
void initializeSymbols(const llvm::object::ELFFile<ELFT> &obj);
void initializeJustSymbols();
- InputSectionBase *getRelocTarget(uint32_t idx, const Elf_Shdr &sec,
- uint32_t info);
+ InputSectionBase *getRelocTarget(uint32_t idx, uint32_t info);
InputSectionBase *createInputSection(uint32_t idx, const Elf_Shdr &sec,
StringRef name);
More information about the llvm-commits
mailing list