[PATCH] D50117: [llvm-objcopy] NFC: Refactor main objcopy method that takes an ELFReader to a generic Reader.

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 1 14:39:51 PDT 2018


alexshap added inline comments.


================
Comment at: tools/llvm-objcopy/llvm-objcopy.cpp:291
 
+static Optional<ElfType> GetOutputElfType(const CopyConfig &Config,
+                                          const Reader &Reader) {
----------------
it looks like now or even in the future None  here is not "recoverable" anyway
(down the line we exit with an error),
maybe it would be better to return the enum directly instead ?
(and if the output format is "binary" it will error("Unsupported output format ...")).


Repository:
  rL LLVM

https://reviews.llvm.org/D50117





More information about the llvm-commits mailing list