[PATCH] D60773: [llvm-objcopy] Support full list of bfd targets that lld uses.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 17 02:08:33 PDT 2019


jhenderson added inline comments.


================
Comment at: llvm/tools/llvm-objcopy/CopyConfig.h:33-34
 struct MachineInfo {
+  MachineInfo(uint16_t EM, uint8_t ABI, bool Is64, bool IsLittle)
+      : EMachine(EM), OSABI(ABI), Is64Bit(Is64), IsLittleEndian(IsLittle) {}
+  // Alternative constructor that defaults to NONE for OSABI.
----------------
rupprecht wrote:
> jhenderson wrote:
> > Where is this constructor still used?
> Missed this when committing: this is shared by the two constructors below. It's a bit speculative; it assumes one might want to explicitly create a MachineInfo with a non-default OSABI. Perhaps we should remove it when extracting this+the same logic in lld into libObject.
Yes, it would be easy enough to explicitly set the defaults inline, without the need for a shared constructor.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D60773





More information about the llvm-commits mailing list