diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 33044af35b0e..6de30447913c 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -554,13 +554,6 @@ template OutputSectionFactory::OutputSectionFactory() {} template OutputSectionFactory::~OutputSectionFactory() {} -template -std::pair -OutputSectionFactory::create(InputSectionBase *C, - StringRef OutsecName) { - SectionKey Key = createKey(C, OutsecName); - return create(Key, C); -} static uint64_t getIncompatibleFlags(uint64_t Flags) { return Flags & (SHF_ALLOC | SHF_TLS); @@ -580,8 +573,9 @@ static bool canMergeToProgbits(unsigned Type) { template std::pair -OutputSectionFactory::create(const SectionKey &Key, - InputSectionBase *C) { +OutputSectionFactory::create(InputSectionBase *C, + StringRef OutsecName) { + SectionKey Key = createKey(C, OutsecName); uintX_t Flags = getOutFlags(C); OutputSectionBase *&Sec = Map[Key]; if (Sec) { diff --git a/lld/ELF/OutputSections.h b/lld/ELF/OutputSections.h index 46a48ba8add9..6055e5f2919f 100644 --- a/lld/ELF/OutputSections.h +++ b/lld/ELF/OutputSections.h @@ -216,9 +216,6 @@ public: ~OutputSectionFactory(); std::pair create(InputSectionBase *C, StringRef OutsecName); - std::pair create(const SectionKey &Key, - InputSectionBase *C); - private: llvm::SmallDenseMap Map; };