Make InputSection a class. NFC.
With the current design an InputSection is basically anything that
goes directly in a OutputSection. That includes plain input section
but also synthetic sections, so this should probably not be a
template.
llvm-svn: 295993
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index eccbb76..5f9b71e 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -401,7 +401,7 @@
return (Sec->Flags & SHF_TLS) && Sec->Type == SHT_NOBITS;
}
-template <class ELFT> void LinkerScript<ELFT>::output(InputSection<ELFT> *S) {
+template <class ELFT> void LinkerScript<ELFT>::output(InputSection *S) {
if (!AlreadyOutputIS.insert(S).second)
return;
bool IsTbss = isTbss<ELFT>(CurOutSec);
@@ -439,7 +439,7 @@
if (!CurOutSec || !AlreadyOutputOS.insert(CurOutSec).second)
return;
if (auto *OutSec = dyn_cast<OutputSection<ELFT>>(CurOutSec)) {
- for (InputSection<ELFT> *I : OutSec->Sections)
+ for (InputSection *I : OutSec->Sections)
output(I);
} else {
Dot += CurOutSec->Size;
@@ -504,7 +504,7 @@
if (!IB->Live)
continue;
switchTo(IB->OutSec);
- if (auto *I = dyn_cast<InputSection<ELFT>>(IB))
+ if (auto *I = dyn_cast<InputSection>(IB))
output(I);
else
flush();