summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2018-11-27 17:47:24 +0000
committerRui Ueyama <ruiu@google.com>2018-11-27 17:47:24 +0000
commit418bcd08304a2264a0e5d2e5a7af734f4eae90c2 (patch)
tree301515c400db791acb28990d91515afd965529c9
parent9123bfddd7a0aa5a1c4f6184d2f668e531e24c00 (diff)
downloadbcm5719-llvm-418bcd08304a2264a0e5d2e5a7af734f4eae90c2.tar.gz
bcm5719-llvm-418bcd08304a2264a0e5d2e5a7af734f4eae90c2.zip
Make a member function non-member. NFC.
llvm-svn: 347678
-rw-r--r--lld/ELF/ICF.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lld/ELF/ICF.cpp b/lld/ELF/ICF.cpp
index 84466618c42..e917ae76a68 100644
--- a/lld/ELF/ICF.cpp
+++ b/lld/ELF/ICF.cpp
@@ -119,9 +119,6 @@ private:
void forEachClass(llvm::function_ref<void(size_t, size_t)> Fn);
- template <class RelTy>
- void combineRelocHashes(InputSection *IS, ArrayRef<RelTy> Rels);
-
std::vector<InputSection *> Sections;
// We repeat the main loop while `Repeat` is true.
@@ -428,9 +425,8 @@ void ICF<ELFT>::forEachClass(llvm::function_ref<void(size_t, size_t)> Fn) {
// Combine the hashes of the sections referenced by the given section into its
// hash.
-template <class ELFT>
-template <class RelTy>
-void ICF<ELFT>::combineRelocHashes(InputSection *IS, ArrayRef<RelTy> Rels) {
+template <class ELFT, class RelTy>
+static void combineRelocHashes(InputSection *IS, ArrayRef<RelTy> Rels) {
uint32_t Hash = IS->Class[1];
for (RelTy Rel : Rels) {
Symbol &S = IS->template getFile<ELFT>()->getRelocTargetSym(Rel);
@@ -462,9 +458,9 @@ template <class ELFT> void ICF<ELFT>::run() {
parallelForEach(Sections, [&](InputSection *S) {
if (S->AreRelocsRela)
- combineRelocHashes(S, S->template relas<ELFT>());
+ combineRelocHashes<ELFT>(S, S->template relas<ELFT>());
else
- combineRelocHashes(S, S->template rels<ELFT>());
+ combineRelocHashes<ELFT>(S, S->template rels<ELFT>());
});
// From now on, sections in Sections vector are ordered so that sections
OpenPOWER on IntegriCloud