LLVM: llvm::objcopy::wasm Namespace Reference (original) (raw)

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)

SectionPred

dumpSectionToFile()

Definition at line 40 of file WasmObjcopy.cpp.

References llvm::objcopy::wasm::Section::Contents, llvm::copy(), llvm::FileOutputBuffer::create(), llvm::createFileError(), E(), InputFilename, llvm::invalid_argument, llvm::objcopy::wasm::Section::Name, llvm::ArrayRef< T >::size(), llvm::StringRef::str(), llvm::Error::success(), and llvm::Expected< T >::takeError().

Referenced by handleArgs().

executeObjcopyOnBinary()

Apply the transformations described by Config and [WasmConfig](structllvm%5F1%5F1objcopy%5F1%5F1WasmConfig.html) to In and writes the result into Out.

Returns

any Error encountered whilst performing the operation.

Definition at line 145 of file WasmObjcopy.cpp.

References assert(), llvm::objcopy::wasm::Reader::create(), llvm::createFileError(), E(), llvm::Expected< T >::get(), handleArgs(), llvm::objcopy::CommonConfig::InputFilename, llvm::objcopy::CommonConfig::OutputFilename, llvm::Error::success(), llvm::Expected< T >::takeError(), and llvm::objcopy::wasm::Writer::write().

Referenced by llvm::objcopy::executeObjcopyOnBinary().

handleArgs()

Definition at line 112 of file WasmObjcopy.cpp.

References llvm::objcopy::CommonConfig::AddSection, llvm::objcopy::wasm::Section::Contents, llvm::objcopy::CommonConfig::DumpSection, dumpSectionToFile(), E(), llvm::MemoryBuffer::getMemBufferCopy(), llvm::objcopy::CommonConfig::InputFilename, llvm::objcopy::wasm::Section::Name, removeSections(), llvm::objcopy::NewSectionInfo::SectionData, llvm::objcopy::NewSectionInfo::SectionName, llvm::objcopy::wasm::Section::SectionType, llvm::Error::success(), and llvm::wasm::WASM_SEC_CUSTOM.

Referenced by executeObjcopyOnBinary().

isCommentSection()

isDebugSection()

isLinkerSection()

isNameSection()

removeSections()

Definition at line 60 of file WasmObjcopy.cpp.

References llvm::objcopy::NameMatcher::empty(), isCommentSection(), isDebugSection(), isLinkerSection(), isNameSection(), llvm::objcopy::CommonConfig::KeepSection, llvm::objcopy::NameMatcher::matches(), llvm::objcopy::CommonConfig::OnlyKeepDebug, llvm::objcopy::CommonConfig::OnlySection, llvm::objcopy::CommonConfig::StripAll, llvm::objcopy::CommonConfig::StripDebug, and llvm::objcopy::CommonConfig::ToRemove.

Referenced by handleArgs().