[PATCH] D77893: [lld] Merge Mach-O input sections
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 24 17:22:13 PDT 2020
smeenai added inline comments.
================
Comment at: lld/MachO/OutputSection.h:41
+ // Some sections may allow coalescing other raw input sections.
+ virtual void mergeInput(InputSection *input);
+
----------------
Ktwu wrote:
> smeenai wrote:
> > Is this needed for anything other than MergedOutputSection?
> No, it's not needed except for MergedOutputSection. Should I dynamically cast each output section before trying to merge an input section into it instead (I wanted to avoid the runtime hit doing that).
Yeah, dynamically casting wouldn't be ideal. We could leave this as-is, or make `getOrCreateOutputSection` return a `MergedOutputSection *` instead of an `OutputSection *` (idk if that'd cause other complications).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77893/new/
https://reviews.llvm.org/D77893
More information about the llvm-commits
mailing list