[PATCH] D113818: [MachO] Shrink reloc from 32 bytes to 24 bytes

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 12 16:25:54 PST 2021


smeenai added a comment.

Turning `findContainingSubsection` into a template is a little ugly, but there's legitimate cases where the offset can be 64 bits (e.g. embedded addends for relocations), so we need to support both `uint32_t *` and `uint64_t *` arguments.

If reviewers prefer, I could instead make `findContainingSubsection` take the `InputSection *` as the output argument and return the adjusted offset, so that the return value can just be downcast instead of needing a template.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113818/new/

https://reviews.llvm.org/D113818



More information about the llvm-commits mailing list