[PATCH] D120650: [ELF] Don't use multiple inheritance for OutputSection. NFC
Peter Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 28 10:36:18 PST 2022
peter.smith added a comment.
No objections for the change. I think it makes sense to logically separate OutputSection from SectionCommand. I'd like to see if anyone else has a strong opinion as there are quite a few changes and some more dynamic memory allocations. I'm wondering if there may be a way of avoiding those somehow, for example could an implicit conversion operator to OutputSection* be added?
================
Comment at: lld/ELF/OutputSections.h:30
+struct OutputDesc final : SectionCommand {
+ OutputSection *osec;
----------------
Given that this doesn't use anything about the representation of OutputSection, would it be better to move it to the `LinkerScript.h` header.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120650/new/
https://reviews.llvm.org/D120650
More information about the llvm-commits
mailing list