LLVM 19.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
12#include "llvm/Support/Error.h"
13
14namespace llvm {
15class raw_ostream;
16
17namespace object {
18class Archive;
19class Binary;
20} // end namespace object
21
22namespace objcopy {
23class MultiFormatConfig;
24
25/// Applies the transformations described by \p Config to
26/// each member in archive \p Ar.
27/// Writes a result in a file specified by \p Config.OutputFilename.
28/// \returns any Error encountered whilst performing the operation.
29Error executeObjcopyOnArchive(const MultiFormatConfig &Config,
30 const object::Archive &Ar);
31
32/// Applies the transformations described by \p Config to \p In and writes
33/// the result into \p Out. This function does the dispatch based on the
34/// format of the input binary (COFF, ELF, MachO or wasm).
35/// \returns any Error encountered whilst performing the operation.
36Error executeObjcopyOnBinary(const MultiFormatConfig &Config,
37 object::Binary &In, raw_ostream &Out);
38
39} // end namespace objcopy
40} // end namespace llvm
41
42#endif // LLVM_OBJCOPY_OBJCOPY_H
RelaxConfig Config
Definition: ELF_riscv.cpp:506
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:38
Error executeObjcopyOnArchive(const MultiFormatConfig &Config, const object::Archive &Ar)
Applies the transformations described by Config to each member in archive Ar.
Definition: Archive.cpp:98
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18