[PATCH] D50343: [llvm-objcopy] Add support for -I binary -B <arch>.

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 13 15:05:23 PDT 2018


rupprecht added inline comments.


================
Comment at: tools/llvm-objcopy/llvm-objcopy.cpp:134-135
   StringRef InputFilename;
   StringRef OutputFormat;
   StringRef InputFormat;
 
----------------
jakehehrlich wrote:
> Do we use these anywhere? I think I added them thinking about how I was going to use them to do exactly what this change does but embedding MachineInfo seems much nicer and convey's the same information. Maybe we should just do that?
We do. Essentially, we use this to decide whether we're going to need a BinaryReader vs ELFReader for InputFormat, and, separately, whether we're going to need a BinaryWriter vs ELFWriter for OutputFormat. BinaryArch is extra information that only applies when using BinaryReader.


Repository:
  rL LLVM

https://reviews.llvm.org/D50343





More information about the llvm-commits mailing list