44 for (
auto Type : Types) {
65 OS <<
"\t.functype\t" << Sym->
getName() <<
" ";
72 OS <<
"\t.globaltype\t" << Sym->
getName() <<
", " 80 OS <<
"\t.eventtype\t" << Sym->
getName() <<
" ";
87 OS <<
"\t.import_module\t" << Sym->
getName() <<
", " 88 << ImportModule <<
'\n';
93 OS <<
"\t.import_name\t" << Sym->
getName() <<
", " 94 << ImportName <<
'\n';
99 OS <<
"\t.export_name\t" << Sym->
getName() <<
", " 100 << ExportName <<
'\n';
104 OS <<
"\t.indidx \t" << *Value <<
'\n';
109 for (
auto Type : Types) {
113 ++Grouped.
back().second;
117 for (
auto Pair : Grouped) {
void emitGlobalType(const MCSymbolWasm *Sym) override
.globaltype
This class represents lattice values for constants.
void push_back(const T &Elt)
This class prints an WebAssembly MCInst to wasm file syntax.
Target specific streamer interface.
const wasm::WasmGlobalType & getGlobalType() const
static void printTypes(formatted_raw_ostream &OS, ArrayRef< wasm::ValType > Types)
Base class for the full range of assembler expressions which are needed for parsing.
std::string signatureToString(const wasm::WasmSignature *Sig)
SmallVector< ValType, 4 > Params
void emitIndIdx(const MCExpr *Value) override
.indidx
const wasm::WasmSignature * getSignature() const
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
void emitImportName(const MCSymbolWasm *Sym, StringRef ImportName) override
.import_name
virtual void EmitIntValue(uint64_t Value, unsigned Size)
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers...
WebAssembly-specific streamer interface, to implement support WebAssembly-specific assembly directive...
void emitValueType(wasm::ValType Type)
Streaming machine code generation interface.
void emitImportModule(const MCSymbolWasm *Sym, StringRef ImportModule) override
.import_module
The instances of the Type class are immutable: once they are created, they are never changed...
This file provides WebAssembly-specific target descriptions.
std::string typeListToString(ArrayRef< wasm::ValType > List)
void emitIndIdx(const MCExpr *Value) override
.indidx
WebAssemblyTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS)
void emitLocal(ArrayRef< wasm::ValType > Types) override
.local
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This file declares WebAssembly-specific target streamer classes.
void emitLocal(ArrayRef< wasm::ValType > Types) override
.local
void emitEndFunc() override
.endfunc
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
void EmitULEB128IntValue(uint64_t Value, unsigned PadTo=0)
Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integ...
void emitFunctionType(const MCSymbolWasm *Sym) override
.functype
LLVM_NODISCARD bool empty() const
WebAssemblyTargetStreamer(MCStreamer &S)
void emitEventType(const MCSymbolWasm *Sym) override
.eventtype
void emitEndFunc() override
.endfunc
StringRef getName() const
getName - Get the symbol name.
void emitExportName(const MCSymbolWasm *Sym, StringRef ExportName) override
.export_name
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
StringRef - Represent a constant reference to a string, i.e.
const char * typeToString(wasm::ValType Ty)
bool empty() const
empty - Check if the array is empty.
WebAssemblyTargetWasmStreamer(MCStreamer &S)