LLVM 20.0.0git
Wasm.h
Go to the documentation of this file.
1//===- Wasm.h - Wasm object file format -------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines manifest constants for the wasm object file format.
10// See: https://github.com/WebAssembly/design/blob/main/BinaryEncoding.md
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_BINARYFORMAT_WASM_H
15#define LLVM_BINARYFORMAT_WASM_H
16
17#include "llvm/ADT/ArrayRef.h"
19#include "llvm/ADT/StringRef.h"
20#include <optional>
21
22namespace llvm {
23namespace wasm {
24
25// Object file magic string.
26const char WasmMagic[] = {'\0', 'a', 's', 'm'};
27// Wasm binary format version
29// Wasm linking metadata version
31// Wasm uses a 64k page size
32const uint32_t WasmPageSize = 65536;
33
34enum : unsigned {
35 WASM_SEC_CUSTOM = 0, // Custom / User-defined section
36 WASM_SEC_TYPE = 1, // Function signature declarations
37 WASM_SEC_IMPORT = 2, // Import declarations
38 WASM_SEC_FUNCTION = 3, // Function declarations
39 WASM_SEC_TABLE = 4, // Indirect function table and other tables
40 WASM_SEC_MEMORY = 5, // Memory attributes
41 WASM_SEC_GLOBAL = 6, // Global declarations
42 WASM_SEC_EXPORT = 7, // Exports
43 WASM_SEC_START = 8, // Start function declaration
44 WASM_SEC_ELEM = 9, // Elements section
45 WASM_SEC_CODE = 10, // Function bodies (code)
46 WASM_SEC_DATA = 11, // Data segments
47 WASM_SEC_DATACOUNT = 12, // Data segment count
48 WASM_SEC_TAG = 13, // Tag declarations
50};
51
52// Type immediate encodings used in various contexts.
53enum : unsigned {
79 WASM_TYPE_NORESULT = 0x40, // for blocks with no result values
80};
81
82// Kinds of externals (for imports and exports).
83enum : unsigned {
89};
90
91// Opcodes used in initializer expressions.
92enum : unsigned {
115};
116
117// Opcodes in the GC-prefixed space (0xfb)
118enum : unsigned {
125 // any.convert_extern and extern.convert_any don't seem to be supported by
126 // Binaryen.
127};
128
129// Opcodes used in synthetic functions.
130enum : unsigned {
145};
146
147// Sub-opcodes for catch clauses in a try_table instruction
148enum : unsigned {
153};
154
155enum : unsigned {
160};
161
162enum : unsigned {
165};
166
167enum : unsigned {
169 WASM_ELEM_SEGMENT_IS_DECLARATIVE = 0x02, // if passive == 1
170 WASM_ELEM_SEGMENT_HAS_TABLE_NUMBER = 0x02, // if passive == 0
172};
174
175// Feature policy prefixes used in the custom "target_features" section
176enum : uint8_t {
179};
180
181// Kind codes used in the custom "name" section
182enum : unsigned {
188};
189
190// Kind codes used in the custom "linking" section
191enum : unsigned {
196};
197
198// Kind codes used in the custom "dylink" section
199enum : unsigned {
204};
205
206// Kind codes used in the custom "linking" section in the WASM_COMDAT_INFO
207enum : unsigned {
210 // GLOBAL, TAG, and TABLE are in here but LLVM doesn't use them yet.
212};
213
214// Kind codes used in the custom "linking" section in the WASM_SYMBOL_TABLE
215enum WasmSymbolType : unsigned {
222};
223
224enum WasmSegmentFlag : unsigned {
228};
229
230// Kinds of tag attributes.
233};
234
235const unsigned WASM_SYMBOL_BINDING_MASK = 0x3;
236const unsigned WASM_SYMBOL_VISIBILITY_MASK = 0xc;
237
238const unsigned WASM_SYMBOL_BINDING_GLOBAL = 0x0;
239const unsigned WASM_SYMBOL_BINDING_WEAK = 0x1;
240const unsigned WASM_SYMBOL_BINDING_LOCAL = 0x2;
242const unsigned WASM_SYMBOL_VISIBILITY_HIDDEN = 0x4;
243const unsigned WASM_SYMBOL_UNDEFINED = 0x10;
244const unsigned WASM_SYMBOL_EXPORTED = 0x20;
245const unsigned WASM_SYMBOL_EXPLICIT_NAME = 0x40;
246const unsigned WASM_SYMBOL_NO_STRIP = 0x80;
247const unsigned WASM_SYMBOL_TLS = 0x100;
248const unsigned WASM_SYMBOL_ABSOLUTE = 0x200;
249
250#define WASM_RELOC(name, value) name = value,
251
252enum : unsigned {
253#include "WasmRelocs.def"
254};
255
256#undef WASM_RELOC
257
261};
262
263// Subset of types that a value can have
264enum class ValType {
273 // Unmodeled value types include ref types with heap types other than
274 // func, extern or exn, and type-specialized funcrefs
275 OTHERREF = 0xff,
276};
277
282};
283
287};
288
290 uint32_t MemorySize; // Memory size in bytes
291 uint32_t MemoryAlignment; // P2 alignment of memory
292 uint32_t TableSize; // Table size in elements
293 uint32_t TableAlignment; // P2 alignment of table
294 std::vector<StringRef> Needed; // Shared library dependencies
295 std::vector<WasmDylinkImportInfo> ImportInfo;
296 std::vector<WasmDylinkExportInfo> ExportInfo;
297};
298
300 std::vector<std::pair<std::string, std::string>> Languages;
301 std::vector<std::pair<std::string, std::string>> Tools;
302 std::vector<std::pair<std::string, std::string>> SDKs;
303};
304
307 std::string Name;
308};
309
314};
315
320};
321
325};
326
327struct WasmTable {
330 StringRef SymbolName; // from the "linking" section
331};
332
335 union {
336 int32_t Int32;
337 int64_t Int64;
342};
343
344// Extended-const init exprs and exprs with GC types are not explicitly
345// modeled, but the raw body of the expr is attached.
347 uint8_t Extended; // Set to non-zero if extended const is used (i.e. more than
348 // one instruction)
351};
352
354 uint8_t Type; // TODO: make this a ValType?
356};
357
362 StringRef SymbolName; // from the "linking" section
363 uint32_t Offset; // Offset of the definition in the binary's Global section
364 uint32_t Size; // Size of the definition in the binary's Global section
365};
366
367struct WasmTag {
370 StringRef SymbolName; // from the "linking" section
371};
372
377 union {
382 };
383};
384
388};
389
393 std::vector<WasmLocalDecl> Locals;
397 uint32_t CodeOffset; // start of Locals and Body
398 std::optional<StringRef> ExportName; // from the "export" section
399 StringRef SymbolName; // from the "linking" section
400 StringRef DebugName; // from the "name" section
401 uint32_t Comdat; // from the "comdat info" section
402};
403
406 // Present if InitFlags & WASM_DATA_SEGMENT_HAS_MEMINDEX.
408 // Present if InitFlags & WASM_DATA_SEGMENT_IS_PASSIVE == 0.
410
412 StringRef Name; // from the "segment info" section
415 uint32_t Comdat; // from the "comdat info" section
416};
417
418// Represents a Wasm element segment, with some limitations compared the spec:
419// 1) Does not model passive or declarative segments (Segment will end up with
420// an Offset field of i32.const 0)
421// 2) Does not model init exprs (Segment will get an empty Functions list)
422// 3) Does not model types other than basic funcref/externref/exnref (see
423// ValType)
429 std::vector<uint32_t> Functions;
430};
431
432// Represents the location of a Wasm data symbol within a WasmDataSegment, as
433// the index of the segment, and the offset and size within the segment.
438};
439
441 uint8_t Type; // The type of the relocation.
442 uint32_t Index; // Index into either symbol or type index space.
443 uint64_t Offset; // Offset from the start of the section.
444 int64_t Addend; // A value to add to the symbol.
445};
446
450};
451
456 // For undefined symbols the module of the import
457 std::optional<StringRef> ImportModule;
458 // For undefined symbols the name of the import
459 std::optional<StringRef> ImportName;
460 // For symbols to be exported from the final module
461 std::optional<StringRef> ExportName;
462 union {
463 // For function, table, or global symbols, the index in function, table, or
464 // global index space.
466 // For a data symbols, the address of the data relative to segment.
468 };
469};
470
471enum class NameType {
472 FUNCTION,
473 GLOBAL,
475};
476
481};
482
483// Info from the linking metadata section of a wasm object file.
486 std::vector<WasmInitFunc> InitFunctions;
487 std::vector<StringRef> Comdats;
488 // The linking section also contains a symbol table. This info (represented
489 // in a WasmSymbolInfo struct) is stored inside the WasmSymbol object instead
490 // of in this structure; this allows vectors of WasmSymbols and
491 // WasmLinkingDatas to be reallocated.
492};
493
497 // LLVM can parse types other than functions encoded in the type section,
498 // but does not actually model them. Instead a placeholder signature is
499 // created in the Object's signature list.
501 // Support empty and tombstone instances, needed by DenseMap.
503
505 SmallVector<ValType, 4> &&InParams)
506 : Returns(InReturns), Params(InParams) {}
507 WasmSignature() = default;
508};
509
510// Useful comparison operators
511inline bool operator==(const WasmSignature &LHS, const WasmSignature &RHS) {
512 return LHS.State == RHS.State && LHS.Returns == RHS.Returns &&
513 LHS.Params == RHS.Params;
514}
515
516inline bool operator!=(const WasmSignature &LHS, const WasmSignature &RHS) {
517 return !(LHS == RHS);
518}
519
520inline bool operator==(const WasmGlobalType &LHS, const WasmGlobalType &RHS) {
521 return LHS.Type == RHS.Type && LHS.Mutable == RHS.Mutable;
522}
523
524inline bool operator!=(const WasmGlobalType &LHS, const WasmGlobalType &RHS) {
525 return !(LHS == RHS);
526}
527
528inline bool operator==(const WasmLimits &LHS, const WasmLimits &RHS) {
529 return LHS.Flags == RHS.Flags && LHS.Minimum == RHS.Minimum &&
530 (LHS.Flags & WASM_LIMITS_FLAG_HAS_MAX ? LHS.Maximum == RHS.Maximum
531 : true);
532}
533
534inline bool operator==(const WasmTableType &LHS, const WasmTableType &RHS) {
535 return LHS.ElemType == RHS.ElemType && LHS.Limits == RHS.Limits;
536}
537
542
543} // end namespace wasm
544} // end namespace llvm
545
546#endif
This file defines the SmallVector class.
Value * RHS
Value * LHS
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1196
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:51
@ WASM_OPCODE_LOCAL_SET
Definition: Wasm.h:96
@ WASM_OPCODE_CALL
Definition: Wasm.h:94
@ WASM_OPCODE_LOCAL_GET
Definition: Wasm.h:95
@ WASM_OPCODE_I64_ADD
Definition: Wasm.h:109
@ WASM_OPCODE_I32_SUB
Definition: Wasm.h:107
@ WASM_OPCODE_F64_CONST
Definition: Wasm.h:105
@ WASM_OPCODE_END
Definition: Wasm.h:93
@ WASM_OPCODE_I64_MUL
Definition: Wasm.h:111
@ WASM_OPCODE_GLOBAL_SET
Definition: Wasm.h:99
@ WASM_OPCODE_REF_NULL
Definition: Wasm.h:112
@ WASM_OPCODE_GC_PREFIX
Definition: Wasm.h:114
@ WASM_OPCODE_REF_FUNC
Definition: Wasm.h:113
@ WASM_OPCODE_F32_CONST
Definition: Wasm.h:104
@ WASM_OPCODE_GLOBAL_GET
Definition: Wasm.h:98
@ WASM_OPCODE_I64_SUB
Definition: Wasm.h:110
@ WASM_OPCODE_I32_MUL
Definition: Wasm.h:108
@ WASM_OPCODE_I32_ADD
Definition: Wasm.h:106
@ WASM_OPCODE_LOCAL_TEE
Definition: Wasm.h:97
@ WASM_OPCODE_I32_STORE
Definition: Wasm.h:100
@ WASM_OPCODE_I64_CONST
Definition: Wasm.h:103
@ WASM_OPCODE_I64_STORE
Definition: Wasm.h:101
@ WASM_OPCODE_I32_CONST
Definition: Wasm.h:102
const unsigned WASM_SYMBOL_UNDEFINED
Definition: Wasm.h:243
const uint32_t WasmPageSize
Definition: Wasm.h:32
@ WASM_TYPE_NULLFUNCREF
Definition: Wasm.h:59
@ WASM_TYPE_ARRAY
Definition: Wasm.h:74
@ WASM_TYPE_NULLREF
Definition: Wasm.h:62
@ WASM_TYPE_NULLABLE
Definition: Wasm.h:72
@ WASM_TYPE_I64
Definition: Wasm.h:55
@ WASM_TYPE_F64
Definition: Wasm.h:57
@ WASM_TYPE_FUNCREF
Definition: Wasm.h:63
@ WASM_TYPE_STRUCTREF
Definition: Wasm.h:69
@ WASM_TYPE_ARRAYREF
Definition: Wasm.h:70
@ WASM_TYPE_ANYREF
Definition: Wasm.h:66
@ WASM_TYPE_EQREF
Definition: Wasm.h:67
@ WASM_TYPE_REC
Definition: Wasm.h:78
@ WASM_TYPE_NULLEXTERNREF
Definition: Wasm.h:60
@ WASM_TYPE_EXTERNREF
Definition: Wasm.h:64
@ WASM_TYPE_SUB
Definition: Wasm.h:76
@ WASM_TYPE_FUNC
Definition: Wasm.h:73
@ WASM_TYPE_I31REF
Definition: Wasm.h:68
@ WASM_TYPE_STRUCT
Definition: Wasm.h:75
@ WASM_TYPE_NULLEXNREF
Definition: Wasm.h:61
@ WASM_TYPE_NONNULLABLE
Definition: Wasm.h:71
@ WASM_TYPE_I32
Definition: Wasm.h:54
@ WASM_TYPE_NORESULT
Definition: Wasm.h:79
@ WASM_TYPE_F32
Definition: Wasm.h:56
@ WASM_TYPE_V128
Definition: Wasm.h:58
@ WASM_TYPE_SUB_FINAL
Definition: Wasm.h:77
@ WASM_TYPE_EXNREF
Definition: Wasm.h:65
const unsigned WASM_SYMBOL_NO_STRIP
Definition: Wasm.h:246
const char WasmMagic[]
Definition: Wasm.h:26
@ WASM_OPCODE_BR
Definition: Wasm.h:132
@ WASM_OPCODE_I32_ATOMIC_STORE
Definition: Wasm.h:143
@ WASM_OPCODE_MEMORY_FILL
Definition: Wasm.h:138
@ WASM_OPCODE_DATA_DROP
Definition: Wasm.h:139
@ WASM_OPCODE_BR_TABLE
Definition: Wasm.h:133
@ WASM_OPCODE_I32_ATOMIC_WAIT
Definition: Wasm.h:142
@ WASM_OPCODE_MISC_PREFIX
Definition: Wasm.h:136
@ WASM_OPCODE_BLOCK
Definition: Wasm.h:131
@ WASM_OPCODE_ATOMIC_NOTIFY
Definition: Wasm.h:141
@ WASM_OPCODE_RETURN
Definition: Wasm.h:134
@ WASM_OPCODE_I32_RMW_CMPXCHG
Definition: Wasm.h:144
@ WASM_OPCODE_MEMORY_INIT
Definition: Wasm.h:137
@ WASM_OPCODE_DROP
Definition: Wasm.h:135
@ WASM_OPCODE_ATOMICS_PREFIX
Definition: Wasm.h:140
@ WASM_ELEM_SEGMENT_HAS_INIT_EXPRS
Definition: Wasm.h:171
@ WASM_ELEM_SEGMENT_IS_DECLARATIVE
Definition: Wasm.h:169
@ WASM_ELEM_SEGMENT_HAS_TABLE_NUMBER
Definition: Wasm.h:170
@ WASM_ELEM_SEGMENT_IS_PASSIVE
Definition: Wasm.h:168
@ WASM_EXTERNAL_TABLE
Definition: Wasm.h:85
@ WASM_EXTERNAL_FUNCTION
Definition: Wasm.h:84
@ WASM_EXTERNAL_TAG
Definition: Wasm.h:88
@ WASM_EXTERNAL_MEMORY
Definition: Wasm.h:86
@ WASM_EXTERNAL_GLOBAL
Definition: Wasm.h:87
const unsigned WASM_SYMBOL_BINDING_GLOBAL
Definition: Wasm.h:238
const unsigned WASM_ELEM_SEGMENT_MASK_HAS_ELEM_KIND
Definition: Wasm.h:173
WasmTagAttribute
Definition: Wasm.h:231
@ WASM_TAG_ATTRIBUTE_EXCEPTION
Definition: Wasm.h:232
const unsigned WASM_SYMBOL_TLS
Definition: Wasm.h:247
const uint32_t WasmMetadataVersion
Definition: Wasm.h:30
const unsigned WASM_SYMBOL_BINDING_WEAK
Definition: Wasm.h:239
const unsigned WASM_SYMBOL_BINDING_LOCAL
Definition: Wasm.h:240
@ WASM_NAMES_LOCAL
Definition: Wasm.h:185
@ WASM_NAMES_DATA_SEGMENT
Definition: Wasm.h:187
@ WASM_NAMES_GLOBAL
Definition: Wasm.h:186
@ WASM_NAMES_FUNCTION
Definition: Wasm.h:184
@ WASM_NAMES_MODULE
Definition: Wasm.h:183
llvm::StringRef toString(WasmSymbolType type)
Definition: Wasm.cpp:11
WasmSymbolType
Definition: Wasm.h:215
@ WASM_SYMBOL_TYPE_GLOBAL
Definition: Wasm.h:218
@ WASM_SYMBOL_TYPE_DATA
Definition: Wasm.h:217
@ WASM_SYMBOL_TYPE_TAG
Definition: Wasm.h:220
@ WASM_SYMBOL_TYPE_TABLE
Definition: Wasm.h:221
@ WASM_SYMBOL_TYPE_SECTION
Definition: Wasm.h:219
@ WASM_SYMBOL_TYPE_FUNCTION
Definition: Wasm.h:216
const uint32_t WasmVersion
Definition: Wasm.h:28
@ WASM_SEC_CODE
Definition: Wasm.h:45
@ WASM_SEC_MEMORY
Definition: Wasm.h:40
@ WASM_SEC_IMPORT
Definition: Wasm.h:37
@ WASM_SEC_EXPORT
Definition: Wasm.h:42
@ WASM_SEC_DATACOUNT
Definition: Wasm.h:47
@ WASM_SEC_LAST_KNOWN
Definition: Wasm.h:49
@ WASM_SEC_CUSTOM
Definition: Wasm.h:35
@ WASM_SEC_FUNCTION
Definition: Wasm.h:38
@ WASM_SEC_ELEM
Definition: Wasm.h:44
@ WASM_SEC_START
Definition: Wasm.h:43
@ WASM_SEC_TABLE
Definition: Wasm.h:39
@ WASM_SEC_TYPE
Definition: Wasm.h:36
@ WASM_SEC_TAG
Definition: Wasm.h:48
@ WASM_SEC_GLOBAL
Definition: Wasm.h:41
@ WASM_SEC_DATA
Definition: Wasm.h:46
@ WASM_OPCODE_ARRAY_NEW_FIXED
Definition: Wasm.h:123
@ WASM_OPCODE_REF_I31
Definition: Wasm.h:124
@ WASM_OPCODE_ARRAY_NEW_DEFAULT
Definition: Wasm.h:122
@ WASM_OPCODE_STRUCT_NEW
Definition: Wasm.h:119
@ WASM_OPCODE_STRUCT_NEW_DEFAULT
Definition: Wasm.h:120
@ WASM_OPCODE_ARRAY_NEW
Definition: Wasm.h:121
const unsigned WASM_SYMBOL_EXPORTED
Definition: Wasm.h:244
const unsigned WASM_SYMBOL_BINDING_MASK
Definition: Wasm.h:235
@ WASM_LIMITS_FLAG_HAS_MAX
Definition: Wasm.h:157
@ WASM_LIMITS_FLAG_IS_SHARED
Definition: Wasm.h:158
@ WASM_LIMITS_FLAG_IS_64
Definition: Wasm.h:159
@ WASM_LIMITS_FLAG_NONE
Definition: Wasm.h:156
bool relocTypeHasAddend(uint32_t type)
Definition: Wasm.cpp:66
@ WASM_OPCODE_CATCH_ALL_REF
Definition: Wasm.h:152
@ WASM_OPCODE_CATCH
Definition: Wasm.h:149
@ WASM_OPCODE_CATCH_ALL
Definition: Wasm.h:151
@ WASM_OPCODE_CATCH_REF
Definition: Wasm.h:150
@ WASM_DATA_SEGMENT_IS_PASSIVE
Definition: Wasm.h:163
@ WASM_DATA_SEGMENT_HAS_MEMINDEX
Definition: Wasm.h:164
WasmSegmentFlag
Definition: Wasm.h:224
@ WASM_SEG_FLAG_RETAIN
Definition: Wasm.h:227
@ WASM_SEG_FLAG_TLS
Definition: Wasm.h:226
@ WASM_SEG_FLAG_STRINGS
Definition: Wasm.h:225
bool operator!=(const WasmSignature &LHS, const WasmSignature &RHS)
Definition: Wasm.h:516
llvm::StringRef sectionTypeToString(uint32_t type)
Definition: Wasm.cpp:41
@ WASM_COMDAT_SECTION
Definition: Wasm.h:211
@ WASM_COMDAT_FUNCTION
Definition: Wasm.h:209
@ WASM_COMDAT_DATA
Definition: Wasm.h:208
const unsigned WASM_SYMBOL_EXPLICIT_NAME
Definition: Wasm.h:245
@ WASM_FEATURE_PREFIX_USED
Definition: Wasm.h:177
@ WASM_FEATURE_PREFIX_DISALLOWED
Definition: Wasm.h:178
const unsigned WASM_SYMBOL_ABSOLUTE
Definition: Wasm.h:248
const unsigned WASM_SYMBOL_VISIBILITY_MASK
Definition: Wasm.h:236
@ WASM_DYLINK_NEEDED
Definition: Wasm.h:201
@ WASM_DYLINK_MEM_INFO
Definition: Wasm.h:200
@ WASM_DYLINK_EXPORT_INFO
Definition: Wasm.h:202
@ WASM_DYLINK_IMPORT_INFO
Definition: Wasm.h:203
const unsigned WASM_SYMBOL_VISIBILITY_HIDDEN
Definition: Wasm.h:242
@ WASM_INIT_FUNCS
Definition: Wasm.h:193
@ WASM_COMDAT_INFO
Definition: Wasm.h:194
@ WASM_SEGMENT_INFO
Definition: Wasm.h:192
@ WASM_SYMBOL_TABLE
Definition: Wasm.h:195
llvm::StringRef relocTypetoString(uint32_t type)
Definition: Wasm.cpp:29
const unsigned WASM_SYMBOL_VISIBILITY_DEFAULT
Definition: Wasm.h:241
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
bool operator==(const AddressRangeValuePair &LHS, const AddressRangeValuePair &RHS)
ArrayRef< uint8_t > Content
Definition: Wasm.h:411
WasmInitExpr Offset
Definition: Wasm.h:409
uint32_t MemoryAlignment
Definition: Wasm.h:291
std::vector< StringRef > Needed
Definition: Wasm.h:294
std::vector< WasmDylinkExportInfo > ExportInfo
Definition: Wasm.h:296
std::vector< WasmDylinkImportInfo > ImportInfo
Definition: Wasm.h:295
uint32_t TableAlignment
Definition: Wasm.h:293
WasmInitExpr Offset
Definition: Wasm.h:428
std::vector< uint32_t > Functions
Definition: Wasm.h:429
StringRef Name
Definition: Wasm.h:311
uint32_t Index
Definition: Wasm.h:313
uint32_t CodeOffset
Definition: Wasm.h:397
ArrayRef< uint8_t > Body
Definition: Wasm.h:394
std::optional< StringRef > ExportName
Definition: Wasm.h:398
std::vector< WasmLocalDecl > Locals
Definition: Wasm.h:393
StringRef SymbolName
Definition: Wasm.h:399
uint32_t CodeSectionOffset
Definition: Wasm.h:395
StringRef DebugName
Definition: Wasm.h:400
uint32_t Offset
Definition: Wasm.h:363
WasmInitExpr InitExpr
Definition: Wasm.h:361
StringRef SymbolName
Definition: Wasm.h:362
WasmGlobalType Type
Definition: Wasm.h:360
uint32_t Index
Definition: Wasm.h:359
WasmLimits Memory
Definition: Wasm.h:381
StringRef Field
Definition: Wasm.h:375
WasmGlobalType Global
Definition: Wasm.h:379
StringRef Module
Definition: Wasm.h:374
uint32_t SigIndex
Definition: Wasm.h:378
WasmTableType Table
Definition: Wasm.h:380
union llvm::wasm::WasmInitExprMVP::@187 Value
WasmInitExprMVP Inst
Definition: Wasm.h:349
ArrayRef< uint8_t > Body
Definition: Wasm.h:350
uint64_t Minimum
Definition: Wasm.h:318
uint64_t Maximum
Definition: Wasm.h:319
std::vector< WasmInitFunc > InitFunctions
Definition: Wasm.h:486
std::vector< StringRef > Comdats
Definition: Wasm.h:487
std::vector< std::pair< std::string, std::string > > SDKs
Definition: Wasm.h:302
std::vector< std::pair< std::string, std::string > > Languages
Definition: Wasm.h:300
std::vector< std::pair< std::string, std::string > > Tools
Definition: Wasm.h:301
WasmSignature(SmallVector< ValType, 1 > &&InReturns, SmallVector< ValType, 4 > &&InParams)
Definition: Wasm.h:504
enum llvm::wasm::WasmSignature::@193 State
SmallVector< ValType, 1 > Returns
Definition: Wasm.h:495
SmallVector< ValType, 4 > Params
Definition: Wasm.h:496
enum llvm::wasm::WasmSignature::@192 Kind
std::optional< StringRef > ExportName
Definition: Wasm.h:461
WasmDataReference DataRef
Definition: Wasm.h:467
std::optional< StringRef > ImportModule
Definition: Wasm.h:457
std::optional< StringRef > ImportName
Definition: Wasm.h:459
WasmLimits Limits
Definition: Wasm.h:324
WasmTableType Type
Definition: Wasm.h:329
StringRef SymbolName
Definition: Wasm.h:330
uint32_t Index
Definition: Wasm.h:328
uint32_t Index
Definition: Wasm.h:368
uint32_t SigIndex
Definition: Wasm.h:369
StringRef SymbolName
Definition: Wasm.h:370