[PATCH] D103979: [lld-macho] Have dead-stripping work with literal sections
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 9 22:02:52 PDT 2021
int3 added inline comments.
================
Comment at: lld/MachO/InputSection.h:123
+ bool live : 1;
+ uint32_t hash : 31;
// Offset from the start of the containing output section.
----------------
tschuett wrote:
> craig.topper wrote:
> > int3 wrote:
> > > oontvoo wrote:
> > > > IMHO, 31 is a bit weird. (It's only 1 bit difference!)
> > > >
> > > 1 extra bit here makes the struct take up 1 extra word :)
> > >
> > > This was taken from LLD-ELF; I have yet to profile it myself, but it seemed like a reasonable idea
> > Should `live` also be uint32_t? If i recall, MSVC needs the types of bitfields to be the same in order to merge the storage.
> Could you add a static_assert for proof and documentation?
ohh, so that's why LLD-ELF uses a uint32_t. Yeah, I'll add a static_assert.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103979/new/
https://reviews.llvm.org/D103979
More information about the llvm-commits
mailing list