@@ -103,12 +103,12 @@ template <class ELFT> class ICF {
103103 void segregate (size_t begin, size_t end, uint32_t eqClassBase, bool constant);
104104
105105 template <class RelTy >
106- bool constantEq (const InputSection *a, ArrayRef <RelTy> relsA,
107- const InputSection *b, ArrayRef <RelTy> relsB);
106+ bool constantEq (const InputSection *a, Relocs <RelTy> relsA,
107+ const InputSection *b, Relocs <RelTy> relsB);
108108
109109 template <class RelTy >
110- bool variableEq (const InputSection *a, ArrayRef <RelTy> relsA,
111- const InputSection *b, ArrayRef <RelTy> relsB);
110+ bool variableEq (const InputSection *a, Relocs <RelTy> relsA,
111+ const InputSection *b, Relocs <RelTy> relsB);
112112
113113 bool equalsConstant (const InputSection *a, const InputSection *b);
114114 bool equalsVariable (const InputSection *a, const InputSection *b);
@@ -235,8 +235,8 @@ void ICF<ELFT>::segregate(size_t begin, size_t end, uint32_t eqClassBase,
235235// Compare two lists of relocations.
236236template <class ELFT >
237237template <class RelTy >
238- bool ICF<ELFT>::constantEq(const InputSection *secA, ArrayRef <RelTy> ra,
239- const InputSection *secB, ArrayRef <RelTy> rb) {
238+ bool ICF<ELFT>::constantEq(const InputSection *secA, Relocs <RelTy> ra,
239+ const InputSection *secB, Relocs <RelTy> rb) {
240240 if (ra.size () != rb.size ())
241241 return false ;
242242 auto rai = ra.begin (), rae = ra.end (), rbi = rb.begin ();
@@ -333,8 +333,8 @@ bool ICF<ELFT>::equalsConstant(const InputSection *a, const InputSection *b) {
333333// relocations point to the same section in terms of ICF.
334334template <class ELFT >
335335template <class RelTy >
336- bool ICF<ELFT>::variableEq(const InputSection *secA, ArrayRef <RelTy> ra,
337- const InputSection *secB, ArrayRef <RelTy> rb) {
336+ bool ICF<ELFT>::variableEq(const InputSection *secA, Relocs <RelTy> ra,
337+ const InputSection *secB, Relocs <RelTy> rb) {
338338 assert (ra.size () == rb.size ());
339339
340340 auto rai = ra.begin (), rae = ra.end (), rbi = rb.begin ();
@@ -441,7 +441,7 @@ void ICF<ELFT>::forEachClass(llvm::function_ref<void(size_t, size_t)> fn) {
441441// hash.
442442template <class RelTy >
443443static void combineRelocHashes (unsigned cnt, InputSection *isec,
444- ArrayRef <RelTy> rels) {
444+ Relocs <RelTy> rels) {
445445 uint32_t hash = isec->eqClass [cnt % 2 ];
446446 for (RelTy rel : rels) {
447447 Symbol &s = isec->file ->getRelocTargetSym (rel);
0 commit comments