This patch prepares llvm-objcopy to move its implementation
into a separate library. To make it possible it is necessary
to minimize internal dependencies. Current CopyConfig has the following
drawbacks:
- Current CopyConfig has parsed and unparsed options at the same time. Thus, parsing functionality is located in different places. Instead, It would be good to parse options once and then have parsed options inside CopyConfig. This patch does all parsing job in the parse*() routines.
- Current implementation has an attempt to hide format-specific options. This patch makes it in a more general way: separate format-specific options using subclasses and allow to create the format-specific views at all options.
So, this patch creates some interfaces representing common and format-specific options:
CopyConfigBase CopyConfigELF CopyConfigCOFF CopyConfigMachO CopyConfigWasm
And a class that allows to switch the view on the full options set:
MultiFormatCopyConfig.
Need to fix the include guards. Same in the other headers, as directed by clang-tidy.