[ELF] Remove EhFrameSection::addSection. NFC
This commit is contained in:
parent
9701053517
commit
81ed005c4c
|
@ -431,16 +431,6 @@ void EhFrameSection::addSectionAux(EhInputSection *sec) {
|
|||
addRecords<ELFT>(sec, rels.relas);
|
||||
}
|
||||
|
||||
void EhFrameSection::addSection(EhInputSection *sec) {
|
||||
sec->parent = this;
|
||||
|
||||
alignment = std::max(alignment, sec->alignment);
|
||||
sections.push_back(sec);
|
||||
|
||||
for (auto *ds : sec->dependentSections)
|
||||
dependentSections.push_back(ds);
|
||||
}
|
||||
|
||||
// Used by ICF<ELFT>::handleLSDA(). This function is very similar to
|
||||
// EhFrameSection::addRecords().
|
||||
template <class ELFT, class RelTy>
|
||||
|
@ -3345,8 +3335,13 @@ template <class ELFT> void elf::splitSections() {
|
|||
|
||||
void elf::combineEhSections() {
|
||||
llvm::TimeTraceScope timeScope("Combine EH sections");
|
||||
for (EhInputSection *sec : ehInputSections)
|
||||
sec->getPartition().ehFrame->addSection(sec);
|
||||
for (EhInputSection *sec : ehInputSections) {
|
||||
EhFrameSection &eh = *sec->getPartition().ehFrame;
|
||||
sec->parent = &eh;
|
||||
eh.alignment = std::max(eh.alignment, sec->alignment);
|
||||
eh.sections.push_back(sec);
|
||||
llvm::append_range(eh.dependentSections, sec->dependentSections);
|
||||
}
|
||||
|
||||
if (!mainPart->armExidx)
|
||||
return;
|
||||
|
|
|
@ -52,8 +52,6 @@ public:
|
|||
return SyntheticSection::classof(d) && d->name == ".eh_frame";
|
||||
}
|
||||
|
||||
void addSection(EhInputSection *sec);
|
||||
|
||||
SmallVector<EhInputSection *, 0> sections;
|
||||
size_t numFdes = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue