[PATCH] D78342: [lld] Add archive file support to Mach-O backend
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 14 16:53:58 PDT 2020
int3 added inline comments.
================
Comment at: lld/MachO/InputFiles.cpp:287
+ auto file = make<ObjFile>(mb);
+ sections.insert(sections.end(), file->sections.begin(), file->sections.end());
+ return file;
----------------
int3 wrote:
> smeenai wrote:
> > This is much nicer!
> >
> > There's still some copying going on here, but given that it's just a bunch of pointers, the copying should be pretty fast. I think this is good enough for now, and we can think about how to make this better in a follow-up. (My cause for concern is that with subsections via symbols implemented, some object files could end up with a sizeable number of sections, so even copying all the pointers over could have a non-trivial cost.)
> With the order file diff, we'll need to copy over all symbols as well, so I think I'll switch this to use a global objectFiles vector
Changed my mind, it's more refactoring / rebasing than I want to do right now...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78342/new/
https://reviews.llvm.org/D78342
More information about the llvm-commits
mailing list