diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2019-03-06 03:07:57 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2019-03-06 03:07:57 +0000 |
commit | 5ee9abd4c80ba45326843fdbc296f0b5d6b78fba (patch) | |
tree | 2cdbccf33d01dc744f2614e47dc03718951e86b4 /lld/ELF/OutputSections.cpp | |
parent | 704dfd6e28cbcd5ea34e0d12767e36952664302d (diff) | |
download | bcm5719-llvm-5ee9abd4c80ba45326843fdbc296f0b5d6b78fba.tar.gz bcm5719-llvm-5ee9abd4c80ba45326843fdbc296f0b5d6b78fba.zip |
ELF: De-template OutputSection::finalize() and MipsGotSection::build(). NFCI.
Differential Revision: https://reviews.llvm.org/D58810
llvm-svn: 355479
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r-- | lld/ELF/OutputSections.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
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 <class ELFT> void OutputSection::writeTo(uint8_t *Buf) { writeInt(Buf + Data->Offset, Data->Expression().getValue(), Data->Size); } -template <class ELFT> 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<ELFT> *Obj = Section->getFile<ELFT>(); - ArrayRef<Symbol *> Symbols = Obj->getSymbols(); + ArrayRef<Symbol *> Symbols = Section->File->getSymbols(); OS->Info = In.SymTab->getSymbolIndex(Symbols[Section->Info]); } -template <class ELFT> void OutputSection::finalize() { +void OutputSection::finalize() { if (Type == SHT_NOBITS) for (BaseCommand *Base : SectionCommands) if (isa<ByteCommand>(Base)) @@ -298,7 +296,7 @@ template <class ELFT> void OutputSection::finalize() { } if (Type == SHT_GROUP) { - finalizeShtGroup<ELFT>(this, First); + finalizeShtGroup(this, First); return; } @@ -428,8 +426,3 @@ template void OutputSection::maybeCompress<ELF32LE>(); template void OutputSection::maybeCompress<ELF32BE>(); template void OutputSection::maybeCompress<ELF64LE>(); template void OutputSection::maybeCompress<ELF64BE>(); - -template void OutputSection::finalize<ELF32LE>(); -template void OutputSection::finalize<ELF32BE>(); -template void OutputSection::finalize<ELF64LE>(); -template void OutputSection::finalize<ELF64BE>(); |