mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
e4864223fe
There is a strange "feature" of the code: it handles all relocations as `Elf_Rela`. For handling `Elf_Rel` it converts them to `Elf_Rela` and passes `bool IsRela` to specify the real type everywhere. A related issue is that the `decode_relrs` helper in lib/Object has to return `Expected<std::vector<Elf_Rela>>` because of that, though it could return a vector of `Elf_Rel`. I think we should just start using templates for relocation types, it makes the code cleaner and shorter. This patch does it. Differential revision: https://reviews.llvm.org/D83871