From 5ee9abd4c80ba45326843fdbc296f0b5d6b78fba Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Wed, 6 Mar 2019 03:07:57 +0000 Subject: ELF: De-template OutputSection::finalize() and MipsGotSection::build(). NFCI. Differential Revision: https://reviews.llvm.org/D58810 llvm-svn: 355479 --- lld/ELF/OutputSections.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'lld/ELF/OutputSections.cpp') diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 96be5a1b4d3..8614a6097e0 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -263,7 +263,6 @@ template void OutputSection::writeTo(uint8_t *Buf) { writeInt(Buf + Data->Offset, Data->Expression().getValue(), Data->Size); } -template static void finalizeShtGroup(OutputSection *OS, InputSection *Section) { assert(Config->Relocatable); @@ -274,12 +273,11 @@ static void finalizeShtGroup(OutputSection *OS, // sh_info then contain index of an entry in symbol table section which // provides signature of the section group. - ObjFile *Obj = Section->getFile(); - ArrayRef Symbols = Obj->getSymbols(); + ArrayRef Symbols = Section->File->getSymbols(); OS->Info = In.SymTab->getSymbolIndex(Symbols[Section->Info]); } -template void OutputSection::finalize() { +void OutputSection::finalize() { if (Type == SHT_NOBITS) for (BaseCommand *Base : SectionCommands) if (isa(Base)) @@ -298,7 +296,7 @@ template void OutputSection::finalize() { } if (Type == SHT_GROUP) { - finalizeShtGroup(this, First); + finalizeShtGroup(this, First); return; } @@ -428,8 +426,3 @@ template void OutputSection::maybeCompress(); template void OutputSection::maybeCompress(); template void OutputSection::maybeCompress(); template void OutputSection::maybeCompress(); - -template void OutputSection::finalize(); -template void OutputSection::finalize(); -template void OutputSection::finalize(); -template void OutputSection::finalize(); -- cgit v1.2.3