diff options
| -rw-r--r-- | lld/ELF/OutputSections.cpp | 7 | ||||
| -rw-r--r-- | lld/ELF/OutputSections.h | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 315ba1cc4db..d782fdac5d1 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -111,9 +111,8 @@ template <class ELFT> void OutputSection::finalize() { this->Info = S->OutSec->SectionIndex; } -void OutputSection::addSection(InputSectionBase *C) { - assert(C->Live); - auto *S = cast<InputSection>(C); +void OutputSection::addSection(InputSection *S) { + assert(S->Live); Sections.push_back(S); S->OutSec = this; this->updateAlignment(S->Alignment); @@ -358,7 +357,7 @@ void OutputSectionFactory::addInputSec(InputSectionBase *IS, OutputSections.push_back(Sec); } - Sec->addSection(IS); + Sec->addSection(cast<InputSection>(IS)); } OutputSectionFactory::~OutputSectionFactory() {} diff --git a/lld/ELF/OutputSections.h b/lld/ELF/OutputSections.h index 649d1fa4834..a95f68a7a2c 100644 --- a/lld/ELF/OutputSections.h +++ b/lld/ELF/OutputSections.h @@ -77,7 +77,7 @@ public: uint64_t Addr = 0; uint32_t ShName = 0; - void addSection(InputSectionBase *C); + void addSection(InputSection *S); void sort(std::function<int(InputSectionBase *S)> Order); void sortInitFini(); void sortCtorsDtors(); |

