diff options
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
| -rw-r--r-- | lld/ELF/OutputSections.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 7c708ce4ed6..0e99de5d45e 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -139,6 +139,13 @@ void OutputSection<ELFT>::addSection(InputSectionData *C) { this->Entsize = S->Entsize; } +template <class ELFT> +void OutputSection<ELFT>::forEachInputSection( + std::function<void(InputSectionData *)> F) { + for (InputSection<ELFT> *S : Sections) + F(S); +} + // This function is called after we sort input sections // and scan relocations to setup sections' offsets. template <class ELFT> void OutputSection<ELFT>::assignOffsets() { @@ -265,6 +272,13 @@ template <class ELFT> EhOutputSection<ELFT>::EhOutputSection() : OutputSectionBase(".eh_frame", SHT_PROGBITS, SHF_ALLOC) {} +template <class ELFT> +void EhOutputSection<ELFT>::forEachInputSection( + std::function<void(InputSectionData *)> F) { + for (EhInputSection<ELFT> *S : Sections) + F(S); +} + // Search for an existing CIE record or create a new one. // CIE records from input object files are uniquified by their contents // and where their relocations point to. |

