@@ -247,8 +247,8 @@ bool ICF<ELFT>::constantEq(const InputSection *secA, ArrayRef<RelTy> ra,
247
247
uint64_t addA = getAddend<ELFT>(ra[i]);
248
248
uint64_t addB = getAddend<ELFT>(rb[i]);
249
249
250
- Symbol &sa = secA->template getFile <ELFT>() ->getRelocTargetSym (ra[i]);
251
- Symbol &sb = secB->template getFile <ELFT>() ->getRelocTargetSym (rb[i]);
250
+ Symbol &sa = secA->file ->getRelocTargetSym (ra[i]);
251
+ Symbol &sb = secB->file ->getRelocTargetSym (rb[i]);
252
252
if (&sa == &sb) {
253
253
if (addA == addB)
254
254
continue ;
@@ -338,8 +338,8 @@ bool ICF<ELFT>::variableEq(const InputSection *secA, ArrayRef<RelTy> ra,
338
338
339
339
for (size_t i = 0 ; i < ra.size (); ++i) {
340
340
// The two sections must be identical.
341
- Symbol &sa = secA->template getFile <ELFT>() ->getRelocTargetSym (ra[i]);
342
- Symbol &sb = secB->template getFile <ELFT>() ->getRelocTargetSym (rb[i]);
341
+ Symbol &sa = secA->file ->getRelocTargetSym (ra[i]);
342
+ Symbol &sb = secB->file ->getRelocTargetSym (rb[i]);
343
343
if (&sa == &sb)
344
344
continue ;
345
345
@@ -437,12 +437,12 @@ void ICF<ELFT>::forEachClass(llvm::function_ref<void(size_t, size_t)> fn) {
437
437
438
438
// Combine the hashes of the sections referenced by the given section into its
439
439
// hash.
440
- template <class ELFT , class RelTy >
440
+ template <class RelTy >
441
441
static void combineRelocHashes (unsigned cnt, InputSection *isec,
442
442
ArrayRef<RelTy> rels) {
443
443
uint32_t hash = isec->eqClass [cnt % 2 ];
444
444
for (RelTy rel : rels) {
445
- Symbol &s = isec->template getFile <ELFT>() ->getRelocTargetSym (rel);
445
+ Symbol &s = isec->file ->getRelocTargetSym (rel);
446
446
if (auto *d = dyn_cast<Defined>(&s))
447
447
if (auto *relSec = dyn_cast_or_null<InputSection>(d->section ))
448
448
hash += relSec->eqClass [cnt % 2 ];
@@ -504,9 +504,9 @@ template <class ELFT> void ICF<ELFT>::run() {
504
504
parallelForEach (sections, [&](InputSection *s) {
505
505
const RelsOrRelas<ELFT> rels = s->template relsOrRelas <ELFT>();
506
506
if (rels.areRelocsRel ())
507
- combineRelocHashes<ELFT> (cnt, s, rels.rels );
507
+ combineRelocHashes (cnt, s, rels.rels );
508
508
else
509
- combineRelocHashes<ELFT> (cnt, s, rels.relas );
509
+ combineRelocHashes (cnt, s, rels.relas );
510
510
});
511
511
}
512
512
0 commit comments