class Writer
Declaration
class Writer { /* full declaration omitted */ };
Declared at: llvm/lib/ObjCopy/wasm/WasmWriter.h:20
Member Variables
- private llvm::objcopy::wasm::Object& Obj
- private llvm::raw_ostream& Out
- private std::vector<SectionHeader> SectionHeaders
Method Overview
- public Writer(llvm::objcopy::wasm::Object & Obj, llvm::raw_ostream & Out)
- private static llvm::objcopy::wasm::Writer::SectionHeader createSectionHeader(const llvm::objcopy::wasm::Section & S, size_t & SectionSize)
- private size_t finalize()
- public llvm::Error write()
Methods
¶Writer(llvm::objcopy::wasm::Object& Obj,
llvm::raw_ostream& Out)
Writer(llvm::objcopy::wasm::Object& Obj,
llvm::raw_ostream& Out)
Declared at: llvm/lib/ObjCopy/wasm/WasmWriter.h:22
Parameters
¶static llvm::objcopy::wasm::Writer::SectionHeader
createSectionHeader(
const llvm::objcopy::wasm::Section& S,
size_t& SectionSize)
static llvm::objcopy::wasm::Writer::SectionHeader
createSectionHeader(
const llvm::objcopy::wasm::Section& S,
size_t& SectionSize)
Description
Generate a wasm section section header for S. The header consists of * A one-byte section ID (aka the section type). * The size of the section contents, encoded as ULEB128. * If the section is a custom section (type 0) it also has a name, which is encoded as a length-prefixed string. The encoded section size *includes* this string. See https://webassembly.github.io/spec/core/binary/modules.html#sections Return the header and store the total size in SectionSize.
Declared at: llvm/lib/ObjCopy/wasm/WasmWriter.h:40
Parameters
- const llvm::objcopy::wasm::Section& S
- size_t& SectionSize
¶size_t finalize()
size_t finalize()
Declared at: llvm/lib/ObjCopy/wasm/WasmWriter.h:42
¶llvm::Error write()
llvm::Error write()
Declared at: llvm/lib/ObjCopy/wasm/WasmWriter.h:23