[PATCH] D114429: [objcopy][NFC] Add doc comments to the executeObjcopy* functions.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 25 01:19:42 PST 2021


jhenderson added inline comments.


================
Comment at: llvm/include/llvm/Object/ObjCopy/COFF/COFFObjcopy.h:27
+/// Applies the transformations described by \p Config to
+/// \p In(FileFormat::Unspecified) and writes the result into \p Out.
+/// \returns any Error encountered whilst performing the operation.
----------------



================
Comment at: llvm/include/llvm/Object/ObjCopy/ELF/ELFObjcopy.h:27
+/// Applies the transformations described by \p Config and \p ELFConfig to
+/// \p In(FileFormat::IHex) and writes the result into \p Out.
+/// \returns any Error encountered whilst performing the operation.
----------------



================
Comment at: llvm/include/llvm/Object/ObjCopy/ELF/ELFObjcopy.h:34
+/// Applies the transformations described by \p Config and \p ELFConfig to
+/// \p In(FileFormat::Binary) and writes the result into \p Out.
+/// \returns any Error encountered whilst performing the operation.
----------------
"Binary" format isn't particularly descriptive, since it's more that objcopy should just wrap the data in a section and add some symbols. Technically all files on disk are "binary" format, since they are written in binary!


================
Comment at: llvm/include/llvm/Object/ObjCopy/ELF/ELFObjcopy.h:41
+/// Applies the transformations described by \p Config and \p ELFConfig to
+/// \p In(FileFormat::ELF or FileFormat::Unspecified) and writes
+/// the result into \p Out.
----------------
I'm a little thrown by the "Unspecified" format. I'm guessing that's just because earlier logic will detect that the input buffer is an ELF file if no explicit input format is specified, and feed it through to here. If that's the case, we shouldn't be mentioning this case, since in both cases, we're working with an ELF file.


================
Comment at: llvm/include/llvm/Object/ObjCopy/MachO/MachOObjcopy.h:28
+/// Applies the transformations described by \p Config and \p MachOConfig to
+/// \p In(FileFormat::Unspecified) and writes the result into \p Out.
+/// \returns any Error encountered whilst performing the operation.
----------------
I'm assuming this is correct, i.e. that the input binary must be Mach-O to get here?


================
Comment at: llvm/include/llvm/Object/ObjCopy/MachO/MachOObjcopy.h:35
+/// Applies the transformations described by \p Config and \p MachOConfig to
+/// \p In(FileFormat::Unspecified) and writes the result into \p Out.
+/// \returns any Error encountered whilst performing the operation.
----------------



================
Comment at: llvm/include/llvm/Object/ObjCopy/wasm/WasmObjcopy.h:26
+/// Applies the transformations described by \p Config to
+/// \p In(FileFormat::Unspecified) and writes the result into \p Out.
+/// \returns any Error encountered whilst performing the operation.
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114429



More information about the llvm-commits mailing list