LLVM  16.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 
14 namespace llvm {
15 class raw_ostream;
16 
17 namespace object {
18 class Archive;
19 class Binary;
20 } // end namespace object
21 
22 namespace objcopy {
23 class 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.
29 Error 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.
36 Error 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
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::lltok::Error
@ Error
Definition: LLToken.h:21
Error.h
llvm::objcopy::executeObjcopyOnBinary
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
llvm::msgpack::Type::Binary
@ Binary
llvm::tgtok::In
@ In
Definition: TGLexer.h:51
object
bar al al movzbl eax ret Missed when stored in a memory object
Definition: README.txt:1411
llvm::objcopy::executeObjcopyOnArchive
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