[PATCH] D99633: [lld-macho][nfc] Refactor in preparation for 32-bit support

Thorsten via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 1 08:21:56 PDT 2021


tschuett added a comment.

In D99633#2664082 <https://reviews.llvm.org/D99633#2664082>, @int3 wrote:

>> Please feel free to ignore me, but it looks odd to needle 32bit support through the ARM64 and X86_64 structs. Inheritance? Common base class?
>
> I guess you're referring to the `set32BitProperties` thing? I was hoping to keep things like `target->wordSize` a direct field access instead of a virtual method, and I couldn't find a way to do it with inheritance... but maybe virtual methods are the way to go after all.

But target->wordSize also goes through the vtable?
And you are loosing section_64 and have to use the less type-safe offset.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99633



More information about the llvm-commits mailing list