LLVM  10.0.0svn
Namespaces | Functions
WasmEmitter.cpp File Reference

The Wasm component of yaml2obj. More...

#include "llvm/Object/Wasm.h"
#include "llvm/ObjectYAML/ObjectYAML.h"
#include "llvm/ObjectYAML/yaml2obj.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/LEB128.h"
Include dependency graph for WasmEmitter.cpp:

Go to the source code of this file.

Namespaces

 llvm
 This class represents lattice values for constants.
 
 llvm::yaml
 

Functions

static int writeUint64 (raw_ostream &OS, uint64_t Value)
 
static int writeUint32 (raw_ostream &OS, uint32_t Value)
 
static int writeUint8 (raw_ostream &OS, uint8_t Value)
 
static int writeStringRef (const StringRef &Str, raw_ostream &OS)
 
static int writeLimits (const WasmYAML::Limits &Lim, raw_ostream &OS)
 
bool llvm::yaml::yaml2wasm (WasmYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
 

Detailed Description

The Wasm component of yaml2obj.

Definition in file WasmEmitter.cpp.

Function Documentation

◆ writeLimits()

static int writeLimits ( const WasmYAML::Limits Lim,
raw_ostream OS 
)
static

Definition at line 117 of file WasmEmitter.cpp.

References llvm::WasmYAML::SegmentInfo::Alignment, assert(), llvm::WasmYAML::Event::Attribute, C, llvm::WasmYAML::LinkingSection::Comdats, llvm::WasmYAML::DataCountSection::Count, llvm::WasmYAML::SymbolInfo::DataRef, E, llvm::WasmYAML::SymbolInfo::ElementIndex, llvm::WasmYAML::Table::ElemType, llvm::encodeSLEB128(), llvm::encodeULEB128(), llvm::WasmYAML::Import::EventImport, llvm::WasmYAML::EventSection::Events, llvm::Export, llvm::WasmYAML::ExportSection::Exports, llvm::WasmYAML::TargetFeaturesSection::Features, llvm::tgtok::Field, llvm::WasmYAML::Import::Field, llvm::WasmYAML::Limits::Flags, llvm::WasmYAML::SegmentInfo::Flags, llvm::WasmYAML::SymbolInfo::Flags, llvm::wasm::WasmInitExpr::Float32, llvm::wasm::WasmInitExpr::Float64, llvm::raw_ostream::flush(), llvm::WasmYAML::Signature::Form, llvm::WasmYAML::NameSection::FunctionNames, llvm::WasmYAML::CodeSection::Functions, llvm::WasmYAML::FunctionSection::FunctionTypes, llvm::wasm::WasmInitExpr::Global, llvm::WasmYAML::Import::GlobalImport, llvm::WasmYAML::GlobalSection::Globals, llvm::Import, llvm::WasmYAML::ImportSection::Imports, llvm::WasmYAML::Export::Index, llvm::WasmYAML::NameEntry::Index, llvm::WasmYAML::Signature::Index, llvm::WasmYAML::SymbolInfo::Index, llvm::WasmYAML::ComdatEntry::Index, Info, llvm::WasmYAML::LinkingSection::InitFunctions, llvm::WasmYAML::Limits::Initial, llvm::wasm::WasmInitExpr::Int32, llvm::wasm::WasmInitExpr::Int64, llvm::object::WasmSectionOrderChecker::isValidSectionOrder(), llvm::WasmYAML::Export::Kind, llvm::WasmYAML::Import::Kind, llvm::WasmYAML::SymbolInfo::Kind, llvm::WasmYAML::ComdatEntry::Kind, llvm::WasmYAML::ProducersSection::Languages, llvm_unreachable, llvm::WasmYAML::Limits::Maximum, llvm::WasmYAML::MemorySection::Memories, llvm::WasmYAML::Import::Memory, llvm::WasmYAML::DylinkSection::MemoryAlignment, llvm::WasmYAML::DylinkSection::MemorySize, llvm::WasmYAML::Import::Module, llvm::WasmYAML::Global::Mutable, llvm::Entry::Name, llvm::WasmYAML::Export::Name, llvm::WasmYAML::NameEntry::Name, llvm::WasmYAML::SegmentInfo::Name, llvm::WasmYAML::SymbolInfo::Name, llvm::WasmYAML::CustomSection::Name, llvm::WasmYAML::DylinkSection::Needed, llvm::wasm::WasmDataReference::Offset, llvm::wasm::WasmInitExpr::Opcode, llvm::WasmYAML::Signature::ParamTypes, llvm::WasmYAML::CustomSection::Payload, llvm::WasmYAML::InitFunction::Priority, llvm::WasmYAML::Section::Relocations, reportError(), llvm::WasmYAML::Signature::ReturnType, llvm::WasmYAML::ProducersSection::SDKs, llvm::ARMBuildAttrs::Section, llvm::wasm::WasmDataReference::Segment, llvm::WasmYAML::LinkingSection::SegmentInfos, llvm::WasmYAML::ElemSection::Segments, llvm::WasmYAML::DataSection::Segments, llvm::WasmYAML::Event::SigIndex, llvm::WasmYAML::Import::SigIndex, llvm::WasmYAML::TypeSection::Signatures, llvm::wasm::WasmDataReference::Size, llvm::WasmYAML::StartSection::StartFunction, llvm::WasmYAML::InitFunction::Symbol, llvm::WasmYAML::LinkingSection::SymbolTable, llvm::WasmYAML::DylinkSection::TableAlignment, llvm::WasmYAML::Import::TableImport, llvm::WasmYAML::Table::TableLimits, llvm::WasmYAML::TableSection::Tables, llvm::WasmYAML::DylinkSection::TableSize, llvm::WasmYAML::ProducersSection::Tools, llvm::WasmYAML::Global::Type, llvm::WasmYAML::Section::Type, llvm::wasm::WasmInitExpr::Value, llvm::WasmYAML::LinkingSection::Version, llvm::wasm::WASM_COMDAT_INFO, llvm::wasm::WASM_EXTERNAL_EVENT, llvm::wasm::WASM_EXTERNAL_FUNCTION, llvm::wasm::WASM_EXTERNAL_GLOBAL, llvm::wasm::WASM_EXTERNAL_MEMORY, llvm::wasm::WASM_EXTERNAL_TABLE, llvm::wasm::WASM_INIT_FUNCS, llvm::wasm::WASM_LIMITS_FLAG_HAS_MAX, llvm::wasm::WASM_NAMES_FUNCTION, llvm::wasm::WASM_OPCODE_END, llvm::wasm::WASM_OPCODE_F32_CONST, llvm::wasm::WASM_OPCODE_F64_CONST, llvm::wasm::WASM_OPCODE_GLOBAL_GET, llvm::wasm::WASM_OPCODE_I32_CONST, llvm::wasm::WASM_OPCODE_I64_CONST, llvm::wasm::WASM_SEC_CODE, llvm::wasm::WASM_SEC_CUSTOM, llvm::wasm::WASM_SEC_DATA, llvm::wasm::WASM_SEGMENT_HAS_MEMINDEX, llvm::wasm::WASM_SEGMENT_INFO, llvm::wasm::WASM_SEGMENT_IS_PASSIVE, llvm::wasm::WASM_SYMBOL_EXPLICIT_NAME, llvm::wasm::WASM_SYMBOL_TABLE, llvm::wasm::WASM_SYMBOL_TYPE_DATA, llvm::wasm::WASM_SYMBOL_TYPE_EVENT, llvm::wasm::WASM_SYMBOL_TYPE_FUNCTION, llvm::wasm::WASM_SYMBOL_TYPE_GLOBAL, llvm::wasm::WASM_SYMBOL_TYPE_SECTION, llvm::wasm::WASM_SYMBOL_UNDEFINED, llvm::wasm::WASM_TYPE_NORESULT, llvm::wasm::WasmMagic, llvm::raw_ostream::write(), llvm::yaml::BinaryRef::writeAsBinary(), writeStringRef(), writeUint32(), writeUint64(), and writeUint8().

◆ writeStringRef()

static int writeStringRef ( const StringRef Str,
raw_ostream OS 
)
static

Definition at line 111 of file WasmEmitter.cpp.

References llvm::encodeULEB128(), and llvm::StringRef::size().

Referenced by writeLimits().

◆ writeUint32()

static int writeUint32 ( raw_ostream OS,
uint32_t  Value 
)
static

Definition at line 97 of file WasmEmitter.cpp.

References llvm::Data, llvm::raw_ostream::write(), and llvm::support::endian::write32le().

Referenced by writeLimits().

◆ writeUint64()

static int writeUint64 ( raw_ostream OS,
uint64_t  Value 
)
static

Definition at line 90 of file WasmEmitter.cpp.

References llvm::Data, llvm::raw_ostream::write(), and llvm::support::endian::write64le().

Referenced by writeLimits().

◆ writeUint8()

static int writeUint8 ( raw_ostream OS,
uint8_t  Value 
)
static

Definition at line 104 of file WasmEmitter.cpp.

References llvm::Data, and llvm::raw_ostream::write().

Referenced by writeLimits().