llvm-project
ab12b430 - [NFCI][ELF] Store DynamicReloc Kind as two bools

Commit
51 days ago
[NFCI][ELF] Store DynamicReloc Kind as two bools 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. Reviewers: MaskRay, arichardson Reviewed By: MaskRay, arichardson Pull Request: https://github.com/llvm/llvm-project/pull/150812
Author
Parents
Loading