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

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 1 08:17:25 PDT 2021


int3 added a comment.

> 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.

> Is sprinkling templates all over ObjFile better than ObjFile32 and ObjFile64?

Pretty sure yes, otherwise every reference to ObjFile will either need to dispatch between the two, or have templates sprinkled on themselves


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