[PATCH] D44236: [llvm-objcopy] Switch over to using TableGen for parsing arguments

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 7 19:46:48 PST 2018


jakehehrlich added inline comments.


================
Comment at: llvm/tools/llvm-objcopy/llvm-objcopy.cpp:137
+  void SplitDWOToFile(const Reader &Reader, StringRef File, ElfType OutputElfType) const;
+};
 
----------------
alexshap wrote:
> for what it's worth, it seems to me this is kind of strange that a struct Config has these methods / logic (i mean CreateWriter, CreateReader, SplitDWOToFile). I've just looked at LLD which also has some kind of Config internally, but there the Config is not loaded with this business logic.
LLD uses a global Config object instead of warping it in a class like I have. I also don't like what I've done that much. The alternative that I see is to pass the Config in as an argument. For HandleArgs that would be pretty painful. I can do that for the others though, what do you think? Alternatively I can go though the burden of  Maybe I should just use a different name? The idea is that you want to be able to set and configure all these different values and then make the result happen. Each driver should set one of these up for each copy operation and it should execute it. Any other ideas?


Repository:
  rL LLVM

https://reviews.llvm.org/D44236





More information about the llvm-commits mailing list