[PATCH] D67139: [llvm-objcopy] Refactor ELF-specific config out to ELFCopyConfig. NFC.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 16 02:55:41 PDT 2019


jhenderson added a comment.

In D67139#1670164 <https://reviews.llvm.org/D67139#1670164>, @jakehehrlich wrote:

> What about having ELFcopyConfig inherit from CopyConfig?


I thought of that, but if I'm not mistaken, that won't help us when we have a mixture of file formats, e.g. ELF and COFF. That could be a problem in some corner cases (e.g. archives containing objects of different formats).  I think Seiya's one has the same problem - we can only use the common config once, not multiple times. If it's not a big deal to create copies of CopyConfig, then I don't mind doing it using inheritance: construct an ELFCopyConfig from the CopyConfig, but not std::move it. That would allow the original CopyConfig to continue to be used later.


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

https://reviews.llvm.org/D67139





More information about the llvm-commits mailing list