LLVM 22.0.0git
ObjCopy.h
Go to the documentation of this file.
1//===- ObjCopy.h ------------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_OBJCOPY_OBJCOPY_H
10#define LLVM_OBJCOPY_OBJCOPY_H
11
13#include "llvm/Support/Error.h"
14
15namespace llvm {
16class raw_ostream;
17
18namespace object {
19class Archive;
20class Binary;
21} // end namespace object
22
23namespace objcopy {
25
26/// Applies the transformations described by \p Config to
27/// each member in archive \p Ar.
28/// Writes a result in a file specified by \p Config.OutputFilename.
29/// \returns any Error encountered whilst performing the operation.
31 const object::Archive &Ar);
32
33/// Applies the transformations described by \p Config to \p In and writes
34/// the result into \p Out. This function does the dispatch based on the
35/// format of the input binary (COFF, ELF, MachO or wasm).
36/// \returns any Error encountered whilst performing the operation.
38 object::Binary &In, raw_ostream &Out);
39
40} // end namespace objcopy
41} // end namespace llvm
42
43#endif // LLVM_OBJCOPY_OBJCOPY_H
#define LLVM_ABI
Definition Compiler.h:213
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
LLVM_ABI Error executeObjcopyOnBinary(const MultiFormatConfig &Config, object::Binary &In, raw_ostream &Out)
Applies the transformations described by Config to In and writes the result into Out.
Definition ObjCopy.cpp:37
LLVM_ABI Error executeObjcopyOnArchive(const MultiFormatConfig &Config, const object::Archive &Ar)
Applies the transformations described by Config to each member in archive Ar.
Definition Archive.cpp:97
This is an optimization pass for GlobalISel generic memory operations.