LLVM 19.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
147enum : unsigned {
152};
153
154enum : unsigned {
157};
158
159enum : unsigned {
161 WASM_ELEM_SEGMENT_IS_DECLARATIVE = 0x02, // if passive == 1
162 WASM_ELEM_SEGMENT_HAS_TABLE_NUMBER = 0x02, // if passive == 0
164};
166
167// Feature policy prefixes used in the custom "target_features" section
168enum : uint8_t {
172};
173
174// Kind codes used in the custom "name" section
175enum : unsigned {
181};
182
183// Kind codes used in the custom "linking" section
184enum : unsigned {
189};
190
191// Kind codes used in the custom "dylink" section
192enum : unsigned {
197};
198
199// Kind codes used in the custom "linking" section in the WASM_COMDAT_INFO
200enum : unsigned {
203 // GLOBAL, TAG, and TABLE are in here but LLVM doesn't use them yet.
205};
206
207// Kind codes used in the custom "linking" section in the WASM_SYMBOL_TABLE
208enum WasmSymbolType : unsigned {
215};
216
217enum WasmSegmentFlag : unsigned {
221};
222
223// Kinds of tag attributes.
224enum WasmTagAttribute : uint8_t {
226};
227
228const unsigned WASM_SYMBOL_BINDING_MASK = 0x3;
229const unsigned WASM_SYMBOL_VISIBILITY_MASK = 0xc;
230
231const unsigned WASM_SYMBOL_BINDING_GLOBAL = 0x0;
232const unsigned WASM_SYMBOL_BINDING_WEAK = 0x1;
233const unsigned WASM_SYMBOL_BINDING_LOCAL = 0x2;
235const unsigned WASM_SYMBOL_VISIBILITY_HIDDEN = 0x4;
236const unsigned WASM_SYMBOL_UNDEFINED = 0x10;
237const unsigned WASM_SYMBOL_EXPORTED = 0x20;
238const unsigned WASM_SYMBOL_EXPLICIT_NAME = 0x40;
239const unsigned WASM_SYMBOL_NO_STRIP = 0x80;
240const unsigned WASM_SYMBOL_TLS = 0x100;
241const unsigned WASM_SYMBOL_ABSOLUTE = 0x200;
242
243#define WASM_RELOC(name, value) name = value,
244
245enum : unsigned {
246#include "WasmRelocs.def"
247};
248
249#undef WASM_RELOC
250
254};
255
256// Subset of types that a value can have
257enum class ValType {
266 // Unmodeled value types include ref types with heap types other than
267 // func, extern or exn, and type-specialized funcrefs
268 OTHERREF = 0xff,
269};
270
275};
276
280};
281
283 uint32_t MemorySize; // Memory size in bytes
284 uint32_t MemoryAlignment; // P2 alignment of memory
285 uint32_t TableSize; // Table size in elements
286 uint32_t TableAlignment; // P2 alignment of table
287 std::vector<StringRef> Needed; // Shared library dependencies
288 std::vector<WasmDylinkImportInfo> ImportInfo;
289 std::vector<WasmDylinkExportInfo> ExportInfo;
290};
291
293 std::vector<std::pair<std::string, std::string>> Languages;
294 std::vector<std::pair<std::string, std::string>> Tools;
295 std::vector<std::pair<std::string, std::string>> SDKs;
296};
297
299 uint8_t Prefix;
300 std::string Name;
301};
302
305 uint8_t Kind;
307};
308
310 uint8_t Flags;
313};
314
318};
319
320struct WasmTable {
323 StringRef SymbolName; // from the "linking" section
324};
325
327 uint8_t Opcode;
328 union {
329 int32_t Int32;
330 int64_t Int64;
335};
336
337// Extended-const init exprs and exprs with GC types are not explicitly
338// modeled, but the raw body of the expr is attached.
340 uint8_t Extended; // Set to non-zero if extended const is used (i.e. more than
341 // one instruction)
344};
345
347 uint8_t Type; // TODO: make this a ValType?
349};
350
355 StringRef SymbolName; // from the "linking" section
356 uint32_t Offset; // Offset of the definition in the binary's Global section
357 uint32_t Size; // Size of the definition in the binary's Global section
358};
359
360struct WasmTag {
363 StringRef SymbolName; // from the "linking" section
364};
365
369 uint8_t Kind;
370 union {
375 };
376};
377
379 uint8_t Type;
381};
382
386 std::vector<WasmLocalDecl> Locals;
390 uint32_t CodeOffset; // start of Locals and Body
391 std::optional<StringRef> ExportName; // from the "export" section
392 StringRef SymbolName; // from the "linking" section
393 StringRef DebugName; // from the "name" section
394 uint32_t Comdat; // from the "comdat info" section
395};
396
399 // Present if InitFlags & WASM_DATA_SEGMENT_HAS_MEMINDEX.
401 // Present if InitFlags & WASM_DATA_SEGMENT_IS_PASSIVE == 0.
403
405 StringRef Name; // from the "segment info" section
408 uint32_t Comdat; // from the "comdat info" section
409};
410
411// Represents a Wasm element segment, with some limitations compared the spec:
412// 1) Does not model passive or declarative segments (Segment will end up with
413// an Offset field of i32.const 0)
414// 2) Does not model init exprs (Segment will get an empty Functions list)
415// 3) Does not model types other than basic funcref/externref/exnref (see
416// ValType)
422 std::vector<uint32_t> Functions;
423};
424
425// Represents the location of a Wasm data symbol within a WasmDataSegment, as
426// the index of the segment, and the offset and size within the segment.
431};
432
434 uint8_t Type; // The type of the relocation.
435 uint32_t Index; // Index into either symbol or type index space.
436 uint64_t Offset; // Offset from the start of the section.
437 int64_t Addend; // A value to add to the symbol.
438};
439
443};
444
447 uint8_t Kind;
449 // For undefined symbols the module of the import
450 std::optional<StringRef> ImportModule;
451 // For undefined symbols the name of the import
452 std::optional<StringRef> ImportName;
453 // For symbols to be exported from the final module
454 std::optional<StringRef> ExportName;
455 union {
456 // For function, table, or global symbols, the index in function, table, or
457 // global index space.
459 // For a data symbols, the address of the data relative to segment.
461 };
462};
463
464enum class NameType {
465 FUNCTION,
466 GLOBAL,
468};
469
474};
475
476// Info from the linking metadata section of a wasm object file.
479 std::vector<WasmInitFunc> InitFunctions;
480 std::vector<StringRef> Comdats;
481 // The linking section also contains a symbol table. This info (represented
482 // in a WasmSymbolInfo struct) is stored inside the WasmSymbol object instead
483 // of in this structure; this allows vectors of WasmSymbols and
484 // WasmLinkingDatas to be reallocated.
485};
486
490 // LLVM can parse types other than functions encoded in the type section,
491 // but does not actually model them. Instead a placeholder signature is
492 // created in the Object's signature list.
494 // Support empty and tombstone instances, needed by DenseMap.
496
498 SmallVector<ValType, 4> &&InParams)
499 : Returns(InReturns), Params(InParams) {}
500 WasmSignature() = default;
501};
502
503// Useful comparison operators
504inline bool operator==(const WasmSignature &LHS, const WasmSignature &RHS) {
505 return LHS.State == RHS.State && LHS.Returns == RHS.Returns &&
506 LHS.Params == RHS.Params;
507}
508
509inline bool operator!=(const WasmSignature &LHS, const WasmSignature &RHS) {
510 return !(LHS == RHS);
511}
512
513inline bool operator==(const WasmGlobalType &LHS, const WasmGlobalType &RHS) {
514 return LHS.Type == RHS.Type && LHS.Mutable == RHS.Mutable;
515}
516
517inline bool operator!=(const WasmGlobalType &LHS, const WasmGlobalType &RHS) {
518 return !(LHS == RHS);
519}
520
521inline bool operator==(const WasmLimits &LHS, const WasmLimits &RHS) {
522 return LHS.Flags == RHS.Flags && LHS.Minimum == RHS.Minimum &&
523 (LHS.Flags & WASM_LIMITS_FLAG_HAS_MAX ? LHS.Maximum == RHS.Maximum
524 : true);
525}
526
527inline bool operator==(const WasmTableType &LHS, const WasmTableType &RHS) {
528 return LHS.ElemType == RHS.ElemType && LHS.Limits == RHS.Limits;
529}
530
535
536} // end namespace wasm
537} // end namespace llvm
538
539#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:1209
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
@ WASM_ELEM_SEGMENT_HAS_INIT_EXPRS
Definition: Wasm.h:163
@ WASM_ELEM_SEGMENT_IS_DECLARATIVE
Definition: Wasm.h:161
@ WASM_ELEM_SEGMENT_HAS_TABLE_NUMBER
Definition: Wasm.h:162
@ WASM_ELEM_SEGMENT_IS_PASSIVE
Definition: Wasm.h:160
const unsigned WASM_SYMBOL_UNDEFINED
Definition: Wasm.h:236
const uint32_t WasmPageSize
Definition: Wasm.h:32
@ WASM_LIMITS_FLAG_HAS_MAX
Definition: Wasm.h:149
@ WASM_LIMITS_FLAG_IS_SHARED
Definition: Wasm.h:150
@ WASM_LIMITS_FLAG_IS_64
Definition: Wasm.h:151
@ WASM_LIMITS_FLAG_NONE
Definition: Wasm.h:148
const unsigned WASM_SYMBOL_NO_STRIP
Definition: Wasm.h:239
@ 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 char WasmMagic[]
Definition: Wasm.h:26
@ WASM_NAMES_LOCAL
Definition: Wasm.h:178
@ WASM_NAMES_DATA_SEGMENT
Definition: Wasm.h:180
@ WASM_NAMES_GLOBAL
Definition: Wasm.h:179
@ WASM_NAMES_FUNCTION
Definition: Wasm.h:177
@ WASM_NAMES_MODULE
Definition: Wasm.h:176
@ 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
@ 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
@ WASM_DATA_SEGMENT_IS_PASSIVE
Definition: Wasm.h:155
@ WASM_DATA_SEGMENT_HAS_MEMINDEX
Definition: Wasm.h:156
const unsigned WASM_SYMBOL_BINDING_GLOBAL
Definition: Wasm.h:231
const unsigned WASM_ELEM_SEGMENT_MASK_HAS_ELEM_KIND
Definition: Wasm.h:165
WasmTagAttribute
Definition: Wasm.h:224
@ WASM_TAG_ATTRIBUTE_EXCEPTION
Definition: Wasm.h:225
const unsigned WASM_SYMBOL_TLS
Definition: Wasm.h:240
@ 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 uint32_t WasmMetadataVersion
Definition: Wasm.h:30
const unsigned WASM_SYMBOL_BINDING_WEAK
Definition: Wasm.h:232
const unsigned WASM_SYMBOL_BINDING_LOCAL
Definition: Wasm.h:233
llvm::StringRef toString(WasmSymbolType type)
Definition: Wasm.cpp:11
WasmSymbolType
Definition: Wasm.h:208
@ WASM_SYMBOL_TYPE_GLOBAL
Definition: Wasm.h:211
@ WASM_SYMBOL_TYPE_DATA
Definition: Wasm.h:210
@ WASM_SYMBOL_TYPE_TAG
Definition: Wasm.h:213
@ WASM_SYMBOL_TYPE_TABLE
Definition: Wasm.h:214
@ WASM_SYMBOL_TYPE_SECTION
Definition: Wasm.h:212
@ WASM_SYMBOL_TYPE_FUNCTION
Definition: Wasm.h:209
const uint32_t WasmVersion
Definition: Wasm.h:28
@ 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
const unsigned WASM_SYMBOL_EXPORTED
Definition: Wasm.h:237
const unsigned WASM_SYMBOL_BINDING_MASK
Definition: Wasm.h:228
@ WASM_DYLINK_NEEDED
Definition: Wasm.h:194
@ WASM_DYLINK_MEM_INFO
Definition: Wasm.h:193
@ WASM_DYLINK_EXPORT_INFO
Definition: Wasm.h:195
@ WASM_DYLINK_IMPORT_INFO
Definition: Wasm.h:196
bool relocTypeHasAddend(uint32_t type)
Definition: Wasm.cpp:66
@ WASM_INIT_FUNCS
Definition: Wasm.h:186
@ WASM_COMDAT_INFO
Definition: Wasm.h:187
@ WASM_SEGMENT_INFO
Definition: Wasm.h:185
@ WASM_SYMBOL_TABLE
Definition: Wasm.h:188
@ WASM_COMDAT_SECTION
Definition: Wasm.h:204
@ WASM_COMDAT_FUNCTION
Definition: Wasm.h:202
@ WASM_COMDAT_DATA
Definition: Wasm.h:201
@ WASM_FEATURE_PREFIX_USED
Definition: Wasm.h:169
@ WASM_FEATURE_PREFIX_REQUIRED
Definition: Wasm.h:170
@ WASM_FEATURE_PREFIX_DISALLOWED
Definition: Wasm.h:171
WasmSegmentFlag
Definition: Wasm.h:217
@ WASM_SEG_FLAG_RETAIN
Definition: Wasm.h:220
@ WASM_SEG_FLAG_TLS
Definition: Wasm.h:219
@ WASM_SEG_FLAG_STRINGS
Definition: Wasm.h:218
@ 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
bool operator!=(const WasmSignature &LHS, const WasmSignature &RHS)
Definition: Wasm.h:509
llvm::StringRef sectionTypeToString(uint32_t type)
Definition: Wasm.cpp:41
const unsigned WASM_SYMBOL_EXPLICIT_NAME
Definition: Wasm.h:238
const unsigned WASM_SYMBOL_ABSOLUTE
Definition: Wasm.h:241
const unsigned WASM_SYMBOL_VISIBILITY_MASK
Definition: Wasm.h:229
const unsigned WASM_SYMBOL_VISIBILITY_HIDDEN
Definition: Wasm.h:235
llvm::StringRef relocTypetoString(uint32_t type)
Definition: Wasm.cpp:29
const unsigned WASM_SYMBOL_VISIBILITY_DEFAULT
Definition: Wasm.h:234
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:404
WasmInitExpr Offset
Definition: Wasm.h:402
uint32_t MemoryAlignment
Definition: Wasm.h:284
std::vector< StringRef > Needed
Definition: Wasm.h:287
std::vector< WasmDylinkExportInfo > ExportInfo
Definition: Wasm.h:289
std::vector< WasmDylinkImportInfo > ImportInfo
Definition: Wasm.h:288
uint32_t TableAlignment
Definition: Wasm.h:286
WasmInitExpr Offset
Definition: Wasm.h:421
std::vector< uint32_t > Functions
Definition: Wasm.h:422
StringRef Name
Definition: Wasm.h:304
uint32_t Index
Definition: Wasm.h:306
uint32_t CodeOffset
Definition: Wasm.h:390
ArrayRef< uint8_t > Body
Definition: Wasm.h:387
std::optional< StringRef > ExportName
Definition: Wasm.h:391
std::vector< WasmLocalDecl > Locals
Definition: Wasm.h:386
StringRef SymbolName
Definition: Wasm.h:392
uint32_t CodeSectionOffset
Definition: Wasm.h:388
StringRef DebugName
Definition: Wasm.h:393
uint32_t Offset
Definition: Wasm.h:356
WasmInitExpr InitExpr
Definition: Wasm.h:354
StringRef SymbolName
Definition: Wasm.h:355
WasmGlobalType Type
Definition: Wasm.h:353
uint32_t Index
Definition: Wasm.h:352
WasmLimits Memory
Definition: Wasm.h:374
StringRef Field
Definition: Wasm.h:368
WasmGlobalType Global
Definition: Wasm.h:372
StringRef Module
Definition: Wasm.h:367
uint32_t SigIndex
Definition: Wasm.h:371
WasmTableType Table
Definition: Wasm.h:373
union llvm::wasm::WasmInitExprMVP::@181 Value
WasmInitExprMVP Inst
Definition: Wasm.h:342
ArrayRef< uint8_t > Body
Definition: Wasm.h:343
uint64_t Minimum
Definition: Wasm.h:311
uint64_t Maximum
Definition: Wasm.h:312
std::vector< WasmInitFunc > InitFunctions
Definition: Wasm.h:479
std::vector< StringRef > Comdats
Definition: Wasm.h:480
std::vector< std::pair< std::string, std::string > > SDKs
Definition: Wasm.h:295
std::vector< std::pair< std::string, std::string > > Languages
Definition: Wasm.h:293
std::vector< std::pair< std::string, std::string > > Tools
Definition: Wasm.h:294
enum llvm::wasm::WasmSignature::@187 State
WasmSignature(SmallVector< ValType, 1 > &&InReturns, SmallVector< ValType, 4 > &&InParams)
Definition: Wasm.h:497
enum llvm::wasm::WasmSignature::@186 Kind
SmallVector< ValType, 1 > Returns
Definition: Wasm.h:488
SmallVector< ValType, 4 > Params
Definition: Wasm.h:489
std::optional< StringRef > ExportName
Definition: Wasm.h:454
WasmDataReference DataRef
Definition: Wasm.h:460
std::optional< StringRef > ImportModule
Definition: Wasm.h:450
std::optional< StringRef > ImportName
Definition: Wasm.h:452
WasmLimits Limits
Definition: Wasm.h:317
WasmTableType Type
Definition: Wasm.h:322
StringRef SymbolName
Definition: Wasm.h:323
uint32_t Index
Definition: Wasm.h:321
uint32_t Index
Definition: Wasm.h:361
uint32_t SigIndex
Definition: Wasm.h:362
StringRef SymbolName
Definition: Wasm.h:363