forked from OSchip/llvm-project
[ELF] - Remove unnecessary template #4. NFC.
OutputSectionFactory has no ELFT templates anymore. llvm-svn: 297720
This commit is contained in:
parent
09268b7b1e
commit
e21c3af7e9
|
@ -375,7 +375,7 @@ void LinkerScript<ELFT>::processCommands(OutputSectionFactory &Factory) {
|
|||
|
||||
// Add input sections to an output section.
|
||||
for (InputSectionBase *S : V)
|
||||
Factory.addInputSec<ELFT>(S, Cmd->Name);
|
||||
Factory.addInputSec(S, Cmd->Name);
|
||||
}
|
||||
}
|
||||
CurOutSec = nullptr;
|
||||
|
@ -386,7 +386,7 @@ template <class ELFT>
|
|||
void LinkerScript<ELFT>::addOrphanSections(OutputSectionFactory &Factory) {
|
||||
for (InputSectionBase *S : InputSections)
|
||||
if (S->Live && !S->OutSec)
|
||||
Factory.addInputSec<ELFT>(S, getOutputSectionName(S->Name));
|
||||
Factory.addInputSec(S, getOutputSectionName(S->Name));
|
||||
}
|
||||
|
||||
template <class ELFT> static bool isTbss(OutputSection *Sec) {
|
||||
|
|
|
@ -334,7 +334,6 @@ static void reportDiscarded(InputSectionBase *IS) {
|
|||
IS->File->getName());
|
||||
}
|
||||
|
||||
template <class ELFT>
|
||||
void OutputSectionFactory::addInputSec(InputSectionBase *IS,
|
||||
StringRef OutsecName) {
|
||||
if (!IS->Live) {
|
||||
|
@ -414,13 +413,5 @@ template void OutputSection::writeTo<ELF32BE>(uint8_t *Buf);
|
|||
template void OutputSection::writeTo<ELF64LE>(uint8_t *Buf);
|
||||
template void OutputSection::writeTo<ELF64BE>(uint8_t *Buf);
|
||||
|
||||
template void OutputSectionFactory::addInputSec<ELF32LE>(InputSectionBase *,
|
||||
StringRef);
|
||||
template void OutputSectionFactory::addInputSec<ELF32BE>(InputSectionBase *,
|
||||
StringRef);
|
||||
template void OutputSectionFactory::addInputSec<ELF64LE>(InputSectionBase *,
|
||||
StringRef);
|
||||
template void OutputSectionFactory::addInputSec<ELF64BE>(InputSectionBase *,
|
||||
StringRef);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -136,7 +136,6 @@ public:
|
|||
OutputSectionFactory(std::vector<OutputSection *> &OutputSections);
|
||||
~OutputSectionFactory();
|
||||
|
||||
template <class ELFT>
|
||||
void addInputSec(InputSectionBase *IS, StringRef OutsecName);
|
||||
|
||||
private:
|
||||
|
|
|
@ -937,7 +937,7 @@ void Writer<ELFT>::forEachRelSec(std::function<void(InputSectionBase &)> Fn) {
|
|||
template <class ELFT> void Writer<ELFT>::createSections() {
|
||||
for (InputSectionBase *IS : InputSections)
|
||||
if (IS)
|
||||
Factory.addInputSec<ELFT>(IS, getOutputSectionName(IS->Name));
|
||||
Factory.addInputSec(IS, getOutputSectionName(IS->Name));
|
||||
|
||||
sortBySymbolsOrder<ELFT>(OutputSections);
|
||||
sortInitFini<ELFT>(findSection(".init_array"));
|
||||
|
|
Loading…
Reference in New Issue