Symbol's subclasses all have an additional bitfield of type uint8_t (RefState enum).
For the bitfields in the same block tomerge, they should be of the same type. (clang/gcc will work, but others like MSVC does not)
Details
Details
- Reviewers
int3 gkm - Group Reviewers
Restricted Project - Commits
- rGae31f9fbaddd: [lld-macho] Change bitfield types to be identical.
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Bitfields can't be merged across classes in either abi: https://gcc.godbolt.org/z/n5Efxh551
Also, Defined doesn't have a refState field.
These fields are semantically bool, so I'd keep them that unless there's a reason to change it. In this case this doesn't buy anything as far as I can tell. (But if you have eg /usr/bin/time -f %M / /usr/bin/time -l numbers to back up a benefit, then changes like this are great of course.)
Comment Actions
oops ... too late . will revert it.
re: benefit: nothing measured yet , I'd been seeing a few warnings in the vicinity warning: ‘lld::macho::DylibSymbol::refState’ is too small to hold all values of ‘enum class lld::macho::RefState’ so I started poking around an noticed this ...