[PATCH] D106427: [lld][ELF] remove empty SyntheticSections from inputSections
Amilendra Kodithuwakku via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 26 01:52:46 PDT 2021
amilendra marked 2 inline comments as done.
amilendra added inline comments.
================
Comment at: lld/ELF/Writer.cpp:1915
+ // orphanSections.
+ for (BaseCommand *b : os->sectionCommands)
+ if (auto *isd = dyn_cast<InputSectionDescription>(b))
----------------
MaskRay wrote:
> The right hand side of `auto end` is now complex.
>
> While here, you can refactor the code to do one batch `llvm::erase_if` for `isd->sections` instead of N `llvm::erase_if`.
>
> You may need a DenseSet
I hope this is what you had in mind.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106427/new/
https://reviews.llvm.org/D106427
More information about the llvm-commits
mailing list