[PATCH] D101724: [lld-macho][nfc] De-templatize mach_header operations

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 2 11:33:14 PDT 2021


int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added a project: lld-macho.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

@thakis pointed out that `mach_header` and `mach_header_64`
actually have the same set of (used) fields, with the 64-bit version
having extra padding. So we can access the fields we need using the
single `mach_header` type instead of using templates to switch between
the two.

Addresses PR50180.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101724

Files:
  lld/MachO/Driver.cpp
  lld/MachO/InputFiles.cpp
  lld/MachO/InputFiles.h
  lld/MachO/SyntheticSections.cpp
  lld/MachO/SyntheticSections.h
  lld/MachO/Target.h
  lld/MachO/Writer.cpp
  lld/MachO/Writer.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101724.342253.patch
Type: text/x-patch
Size: 9604 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210502/42d847ed/attachment.bin>


More information about the llvm-commits mailing list