diff --git a/llvm/include/llvm/Object/ObjCopy/COFF/COFFObjcopy.h b/llvm/include/llvm/Object/ObjCopy/COFF/COFFObjcopy.h --- a/llvm/include/llvm/Object/ObjCopy/COFF/COFFObjcopy.h +++ b/llvm/include/llvm/Object/ObjCopy/COFF/COFFObjcopy.h @@ -23,6 +23,9 @@ namespace coff { +/// Applies the transformations described by \p Config and \p COFFConfig +/// to \p In and writes the result into \p Out. +/// \returns any Error encountered whilst performing the operation. Error executeObjcopyOnBinary(const CommonConfig &Config, const COFFConfig &, object::COFFObjectFile &In, raw_ostream &Out); diff --git a/llvm/include/llvm/Object/ObjCopy/ELF/ELFObjcopy.h b/llvm/include/llvm/Object/ObjCopy/ELF/ELFObjcopy.h --- a/llvm/include/llvm/Object/ObjCopy/ELF/ELFObjcopy.h +++ b/llvm/include/llvm/Object/ObjCopy/ELF/ELFObjcopy.h @@ -23,14 +23,25 @@ struct ELFConfig; namespace elf { +/// Applies the transformations described by \p Config and \p ELFConfig to +/// \p In, which must represent an IHex file, and writes the result +/// into \p Out. +/// \returns any Error encountered whilst performing the operation. Error executeObjcopyOnIHex(const CommonConfig &Config, const ELFConfig &ELFConfig, MemoryBuffer &In, raw_ostream &Out); +/// Applies the transformations described by \p Config and \p ELFConfig to +/// \p In, which is treated as a raw binary input, and writes the result +/// into \p Out. +/// \returns any Error encountered whilst performing the operation. Error executeObjcopyOnRawBinary(const CommonConfig &Config, const ELFConfig &ELFConfig, MemoryBuffer &In, raw_ostream &Out); +/// Applies the transformations described by \p Config and \p ELFConfig to +/// \p In and writes the result into \p Out. +/// \returns any Error encountered whilst performing the operation. Error executeObjcopyOnBinary(const CommonConfig &Config, const ELFConfig &ELFConfig, object::ELFObjectFileBase &In, raw_ostream &Out); diff --git a/llvm/include/llvm/Object/ObjCopy/MachO/MachOObjcopy.h b/llvm/include/llvm/Object/ObjCopy/MachO/MachOObjcopy.h --- a/llvm/include/llvm/Object/ObjCopy/MachO/MachOObjcopy.h +++ b/llvm/include/llvm/Object/ObjCopy/MachO/MachOObjcopy.h @@ -24,10 +24,16 @@ class MultiFormatConfig; namespace macho { +/// Applies the transformations described by \p Config and \p MachOConfig to +/// \p In and writes the result into \p Out. +/// \returns any Error encountered whilst performing the operation. Error executeObjcopyOnBinary(const CommonConfig &Config, const MachOConfig &MachOConfig, object::MachOObjectFile &In, raw_ostream &Out); +/// Applies the transformations described by \p Config and \p MachOConfig to +/// \p In and writes the result into \p Out. +/// \returns any Error encountered whilst performing the operation. Error executeObjcopyOnMachOUniversalBinary( const MultiFormatConfig &Config, const object::MachOUniversalBinary &In, raw_ostream &Out); diff --git a/llvm/include/llvm/Object/ObjCopy/wasm/WasmObjcopy.h b/llvm/include/llvm/Object/ObjCopy/wasm/WasmObjcopy.h --- a/llvm/include/llvm/Object/ObjCopy/wasm/WasmObjcopy.h +++ b/llvm/include/llvm/Object/ObjCopy/wasm/WasmObjcopy.h @@ -22,6 +22,9 @@ struct WasmConfig; namespace wasm { +/// Applies the transformations described by \p Config and \p WasmConfig +/// to \p In and writes the result into \p Out. +/// \returns any Error encountered whilst performing the operation. Error executeObjcopyOnBinary(const CommonConfig &Config, const WasmConfig &, object::WasmObjectFile &In, raw_ostream &Out);