LLVM 22.0.0git
llvm::objcopy::wasm Namespace Reference

Classes

struct  Object
class  Reader
struct  Section
class  Writer

Typedefs

using SectionPred = std::function<bool(const Section &Sec)>

Functions

LLVM_ABI Error executeObjcopyOnBinary (const CommonConfig &Config, const WasmConfig &, object::WasmObjectFile &In, raw_ostream &Out)
 Apply the transformations described by Config and WasmConfig to In and writes the result into Out.
static bool isDebugSection (const Section &Sec)
static bool isLinkerSection (const Section &Sec)
static bool isNameSection (const Section &Sec)
static bool isCommentSection (const Section &Sec)
static Error dumpSectionToFile (StringRef SecName, StringRef Filename, StringRef InputFilename, Object &Obj)
static void removeSections (const CommonConfig &Config, Object &Obj)
static Error handleArgs (const CommonConfig &Config, Object &Obj)

Typedef Documentation

◆ SectionPred

using llvm::objcopy::wasm::SectionPred = std::function<bool(const Section &Sec)>

Definition at line 22 of file WasmObjcopy.cpp.

Function Documentation

◆ dumpSectionToFile()

◆ executeObjcopyOnBinary()

Error llvm::objcopy::wasm::executeObjcopyOnBinary ( const CommonConfig & Config,
const WasmConfig & ,
object::WasmObjectFile & In,
raw_ostream & Out )

◆ handleArgs()

◆ isCommentSection()

bool llvm::objcopy::wasm::isCommentSection ( const Section & Sec)
static

Definition at line 36 of file WasmObjcopy.cpp.

References llvm::objcopy::wasm::Section::Name.

Referenced by removeSections().

◆ isDebugSection()

bool llvm::objcopy::wasm::isDebugSection ( const Section & Sec)
static

Definition at line 24 of file WasmObjcopy.cpp.

References llvm::objcopy::wasm::Section::Name, and llvm::StringRef::starts_with().

Referenced by removeSections().

◆ isLinkerSection()

bool llvm::objcopy::wasm::isLinkerSection ( const Section & Sec)
static

Definition at line 28 of file WasmObjcopy.cpp.

References llvm::objcopy::wasm::Section::Name, and llvm::StringRef::starts_with().

Referenced by removeSections().

◆ isNameSection()

bool llvm::objcopy::wasm::isNameSection ( const Section & Sec)
static

Definition at line 32 of file WasmObjcopy.cpp.

References llvm::objcopy::wasm::Section::Name.

Referenced by removeSections().

◆ removeSections()