[llvm-branch-commits] [NFCI][ELF] Store DynamicReloc Kind as two bools (PR #150812)
Jessica Clarke via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Jul 26 18:17:48 PDT 2025
https://github.com/jrtc27 created https://github.com/llvm/llvm-project/pull/150812
Aside from Computed, Kind is now just AddendOnly and AgainstSymbol, so
it's really just a bool reflecting whether the resulting ELF relocation
should reference the symbol or not. Refactor DynamicReloc's storage to
reflect this, splitting Computed out into its own orthogonal isFinal
bool. As part of this, rename computeRaw to finalize to reflect that
it's side-effecting.
This also allows needsDynSymIndex() to work even after finalize(), so
drop the existing assertion.
A future commit will refact the DynamicReloc API to take isAgainstSymbol
directly now the enum serves little purpose, as a more invasive,
mechanical change. For this commit we keep DynamicReloc::Kind as the
external API.
More information about the llvm-branch-commits
mailing list