Skip to content

Commit 5fde3e8

Browse files
committed
ELF: EhFrameSection: Remove unused template parameters
1 parent 3bdf05a commit 5fde3e8

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lld/ELF/SyntheticSections.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ EhFrameSection::EhFrameSection(Ctx &ctx)
403403
// Search for an existing CIE record or create a new one.
404404
// CIE records from input object files are uniquified by their contents
405405
// and where their relocations point to.
406-
template <class ELFT, class RelTy>
406+
template <class RelTy>
407407
CieRecord *EhFrameSection::addCie(EhSectionPiece &cie, ArrayRef<RelTy> rels) {
408408
Symbol *personality = nullptr;
409409
unsigned firstRelI = cie.firstRelocation;
@@ -424,7 +424,7 @@ CieRecord *EhFrameSection::addCie(EhSectionPiece &cie, ArrayRef<RelTy> rels) {
424424

425425
// There is one FDE per function. Returns a non-null pointer to the function
426426
// symbol if the given FDE points to a live function.
427-
template <class ELFT, class RelTy>
427+
template <class RelTy>
428428
Defined *EhFrameSection::isFdeLive(EhSectionPiece &fde, ArrayRef<RelTy> rels) {
429429
auto *sec = cast<EhInputSection>(fde.sec);
430430
unsigned firstRelI = fde.firstRelocation;
@@ -456,14 +456,14 @@ template <class ELFT, class RelTy>
456456
void EhFrameSection::addRecords(EhInputSection *sec, ArrayRef<RelTy> rels) {
457457
offsetToCie.clear();
458458
for (EhSectionPiece &cie : sec->cies)
459-
offsetToCie[cie.inputOff] = addCie<ELFT>(cie, rels);
459+
offsetToCie[cie.inputOff] = addCie<RelTy>(cie, rels);
460460
for (EhSectionPiece &fde : sec->fdes) {
461461
uint32_t id = endian::read32<ELFT::Endianness>(fde.data().data() + 4);
462462
CieRecord *rec = offsetToCie[fde.inputOff + 4 - id];
463463
if (!rec)
464464
Fatal(ctx) << sec << ": invalid CIE reference";
465465

466-
if (!isFdeLive<ELFT>(fde, rels))
466+
if (!isFdeLive(fde, rels))
467467
continue;
468468
rec->fdes.push_back(&fde);
469469
numFdes++;
@@ -497,7 +497,7 @@ void EhFrameSection::iterateFDEWithLSDAAux(
497497
continue;
498498

499499
// The CIE has a LSDA argument. Call fn with d's section.
500-
if (Defined *d = isFdeLive<ELFT>(fde, rels))
500+
if (Defined *d = isFdeLive(fde, rels))
501501
if (auto *s = dyn_cast_or_null<InputSection>(d->section))
502502
fn(*s);
503503
}

lld/ELF/SyntheticSections.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ class EhFrameSection final : public SyntheticSection {
8888
llvm::DenseSet<size_t> &ciesWithLSDA,
8989
llvm::function_ref<void(InputSection &)> fn);
9090

91-
template <class ELFT, class RelTy>
91+
template <class RelTy>
9292
CieRecord *addCie(EhSectionPiece &piece, ArrayRef<RelTy> rels);
9393

94-
template <class ELFT, class RelTy>
94+
template <class RelTy>
9595
Defined *isFdeLive(EhSectionPiece &piece, ArrayRef<RelTy> rels);
9696

9797
uint64_t getFdePc(uint8_t *buf, size_t off, uint8_t enc) const;

0 commit comments

Comments
 (0)