#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"
usingnamespacellvm;
namespace {
class WasmWriter { … };
class SubSectionWriter { … };
}
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) { … }
void WasmWriter::reportError(const Twine &Msg) { … }
void WasmWriter::writeInitExpr(raw_ostream &OS,
const WasmYAML::InitExpr &InitExpr) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::DylinkSection &Section) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::LinkingSection &Section) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::NameSection &Section) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::ProducersSection &Section) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::TargetFeaturesSection &Section) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::CustomSection &Section) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::TypeSection &Section) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::ImportSection &Section) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::FunctionSection &Section) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::ExportSection &Section) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::StartSection &Section) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::TableSection &Section) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::MemorySection &Section) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::TagSection &Section) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::GlobalSection &Section) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::ElemSection &Section) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::CodeSection &Section) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::DataSection &Section) { … }
void WasmWriter::writeSectionContent(raw_ostream &OS,
WasmYAML::DataCountSection &Section) { … }
void WasmWriter::writeRelocSection(raw_ostream &OS, WasmYAML::Section &Sec,
uint32_t SectionIndex) { … }
bool WasmWriter::writeWasm(raw_ostream &OS) { … }
namespace llvm {
namespace yaml {
bool yaml2wasm(WasmYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH) { … }
}
}