45 for (
auto Type : Types) {
64 void WebAssemblyTargetAsmStreamer::emitSignature(
73 void WebAssemblyTargetAsmStreamer::emitParamList(
75 auto &Params = Sig->
Params;
76 for (
auto &Ty : Params) {
77 if (&Ty != &Params[0])
83 void WebAssemblyTargetAsmStreamer::emitReturnList(
86 for (
auto &Ty : Returns) {
87 if (&Ty != &Returns[0])
95 OS <<
"\t.functype\t" << Sym->
getName() <<
" ";
102 OS <<
"\t.globaltype\t" << Sym->
getName() <<
", " 110 OS <<
"\t.eventtype\t" << Sym->
getName() <<
" ";
117 OS <<
"\t.import_module\t" << Sym->
getName() <<
", " 118 << ImportModule <<
'\n';
123 OS <<
"\t.import_name\t" << Sym->
getName() <<
", " 124 << ImportName <<
'\n';
128 OS <<
"\t.indidx \t" << *Value <<
'\n';
133 for (
auto Type : Types) {
137 ++Grouped.
back().second;
141 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.
SmallVector< wasm::ValType, 1 > Returns
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.
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.
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 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.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
StringRef - Represent a constant reference to a string, i.e.
void EmitULEB128IntValue(uint64_t Value)
Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integ...
const char * typeToString(wasm::ValType Ty)
SmallVector< wasm::ValType, 4 > Params
bool empty() const
empty - Check if the array is empty.
WebAssemblyTargetWasmStreamer(MCStreamer &S)