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 {
78 WASM_TYPE_NORESULT = 0x40, // for blocks with no result values
79};
80
81// Kinds of externals (for imports and exports).
82enum : unsigned {
88};
89
90// Opcodes used in initializer expressions.
91enum : unsigned {
114};
115
116// Opcodes in the GC-prefixed space (0xfb)
117enum : unsigned {
124 // any.convert_extern and extern.convert_any don't seem to be supported by
125 // Binaryen.
126};
127
128// Opcodes used in synthetic functions.
129enum : unsigned {
144};
145
146enum : unsigned {
151};
152
153enum : unsigned {
156};
157
158enum : unsigned {
160 WASM_ELEM_SEGMENT_IS_DECLARATIVE = 0x02, // if passive == 1
161 WASM_ELEM_SEGMENT_HAS_TABLE_NUMBER = 0x02, // if passive == 0
163};
165
166// Feature policy prefixes used in the custom "target_features" section
167enum : uint8_t {
171};
172
173// Kind codes used in the custom "name" section
174enum : unsigned {
180};
181
182// Kind codes used in the custom "linking" section
183enum : unsigned {
188};
189
190// Kind codes used in the custom "dylink" section
191enum : unsigned {
196};
197
198// Kind codes used in the custom "linking" section in the WASM_COMDAT_INFO
199enum : unsigned {
202 // GLOBAL, TAG, and TABLE are in here but LLVM doesn't use them yet.
204};
205
206// Kind codes used in the custom "linking" section in the WASM_SYMBOL_TABLE
207enum WasmSymbolType : unsigned {
214};
215
216enum WasmSegmentFlag : unsigned {
220};
221
222// Kinds of tag attributes.
223enum WasmTagAttribute : uint8_t {
225};
226
227const unsigned WASM_SYMBOL_BINDING_MASK = 0x3;
228const unsigned WASM_SYMBOL_VISIBILITY_MASK = 0xc;
229
230const unsigned WASM_SYMBOL_BINDING_GLOBAL = 0x0;
231const unsigned WASM_SYMBOL_BINDING_WEAK = 0x1;
232const unsigned WASM_SYMBOL_BINDING_LOCAL = 0x2;
234const unsigned WASM_SYMBOL_VISIBILITY_HIDDEN = 0x4;
235const unsigned WASM_SYMBOL_UNDEFINED = 0x10;
236const unsigned WASM_SYMBOL_EXPORTED = 0x20;
237const unsigned WASM_SYMBOL_EXPLICIT_NAME = 0x40;
238const unsigned WASM_SYMBOL_NO_STRIP = 0x80;
239const unsigned WASM_SYMBOL_TLS = 0x100;
240const unsigned WASM_SYMBOL_ABSOLUTE = 0x200;
241
242#define WASM_RELOC(name, value) name = value,
243
244enum : unsigned {
245#include "WasmRelocs.def"
246};
247
248#undef WASM_RELOC
249
253};
254
255// Subset of types that a value can have
256enum class ValType {
264 // Unmodeled value types include ref types with heap types other than
265 // func or extern, and type-specialized funcrefs
266 OTHERREF = 0xff,
267};
268
273};
274
278};
279
281 uint32_t MemorySize; // Memory size in bytes
282 uint32_t MemoryAlignment; // P2 alignment of memory
283 uint32_t TableSize; // Table size in elements
284 uint32_t TableAlignment; // P2 alignment of table
285 std::vector<StringRef> Needed; // Shared library dependencies
286 std::vector<WasmDylinkImportInfo> ImportInfo;
287 std::vector<WasmDylinkExportInfo> ExportInfo;
288};
289
291 std::vector<std::pair<std::string, std::string>> Languages;
292 std::vector<std::pair<std::string, std::string>> Tools;
293 std::vector<std::pair<std::string, std::string>> SDKs;
294};
295
297 uint8_t Prefix;
298 std::string Name;
299};
300
303 uint8_t Kind;
305};
306
308 uint8_t Flags;
311};
312
316};
317
318struct WasmTable {
321 StringRef SymbolName; // from the "linking" section
322};
323
325 uint8_t Opcode;
326 union {
327 int32_t Int32;
328 int64_t Int64;
333};
334
335// Extended-const init exprs and exprs with GC types are not explicitly
336// modeled, but the raw body of the expr is attached.
338 uint8_t Extended; // Set to non-zero if extended const is used (i.e. more than
339 // one instruction)
342};
343
345 uint8_t Type; // TODO: make this a ValType?
347};
348
353 StringRef SymbolName; // from the "linking" section
354 uint32_t Offset; // Offset of the definition in the binary's Global section
355 uint32_t Size; // Size of the definition in the binary's Global section
356};
357
358struct WasmTag {
361 StringRef SymbolName; // from the "linking" section
362};
363
367 uint8_t Kind;
368 union {
373 };
374};
375
377 uint8_t Type;
379};
380
384 std::vector<WasmLocalDecl> Locals;
388 uint32_t CodeOffset; // start of Locals and Body
389 std::optional<StringRef> ExportName; // from the "export" section
390 StringRef SymbolName; // from the "linking" section
391 StringRef DebugName; // from the "name" section
392 uint32_t Comdat; // from the "comdat info" section
393};
394
397 // Present if InitFlags & WASM_DATA_SEGMENT_HAS_MEMINDEX.
399 // Present if InitFlags & WASM_DATA_SEGMENT_IS_PASSIVE == 0.
401
403 StringRef Name; // from the "segment info" section
406 uint32_t Comdat; // from the "comdat info" section
407};
408
409// Represents a Wasm element segment, with some limitations compared the spec:
410// 1) Does not model passive or declarative segments (Segment will end up with
411// an Offset field of i32.const 0)
412// 2) Does not model init exprs (Segment will get an empty Functions list)
413// 2) Does not model types other than basic funcref/externref (see ValType)
419 std::vector<uint32_t> Functions;
420};
421
422// Represents the location of a Wasm data symbol within a WasmDataSegment, as
423// the index of the segment, and the offset and size within the segment.
428};
429
431 uint8_t Type; // The type of the relocation.
432 uint32_t Index; // Index into either symbol or type index space.
433 uint64_t Offset; // Offset from the start of the section.
434 int64_t Addend; // A value to add to the symbol.
435};
436
440};
441
444 uint8_t Kind;
446 // For undefined symbols the module of the import
447 std::optional<StringRef> ImportModule;
448 // For undefined symbols the name of the import
449 std::optional<StringRef> ImportName;
450 // For symbols to be exported from the final module
451 std::optional<StringRef> ExportName;
452 union {
453 // For function, table, or global symbols, the index in function, table, or
454 // global index space.
456 // For a data symbols, the address of the data relative to segment.
458 };
459};
460
461enum class NameType {
462 FUNCTION,
463 GLOBAL,
465};
466
471};
472
473// Info from the linking metadata section of a wasm object file.
476 std::vector<WasmInitFunc> InitFunctions;
477 std::vector<StringRef> Comdats;
478 // The linking section also contains a symbol table. This info (represented
479 // in a WasmSymbolInfo struct) is stored inside the WasmSymbol object instead
480 // of in this structure; this allows vectors of WasmSymbols and
481 // WasmLinkingDatas to be reallocated.
482};
483
487 // LLVM can parse types other than functions encoded in the type section,
488 // but does not actually model them. Instead a placeholder signature is
489 // created in the Object's signature list.
491 // Support empty and tombstone instances, needed by DenseMap.
493
495 SmallVector<ValType, 4> &&InParams)
496 : Returns(InReturns), Params(InParams) {}
497 WasmSignature() = default;
498};
499
500// Useful comparison operators
501inline bool operator==(const WasmSignature &LHS, const WasmSignature &RHS) {
502 return LHS.State == RHS.State && LHS.Returns == RHS.Returns &&
503 LHS.Params == RHS.Params;
504}
505
506inline bool operator!=(const WasmSignature &LHS, const WasmSignature &RHS) {
507 return !(LHS == RHS);
508}
509
510inline bool operator==(const WasmGlobalType &LHS, const WasmGlobalType &RHS) {
511 return LHS.Type == RHS.Type && LHS.Mutable == RHS.Mutable;
512}
513
514inline bool operator!=(const WasmGlobalType &LHS, const WasmGlobalType &RHS) {
515 return !(LHS == RHS);
516}
517
518inline bool operator==(const WasmLimits &LHS, const WasmLimits &RHS) {
519 return LHS.Flags == RHS.Flags && LHS.Minimum == RHS.Minimum &&
520 (LHS.Flags & WASM_LIMITS_FLAG_HAS_MAX ? LHS.Maximum == RHS.Maximum
521 : true);
522}
523
524inline bool operator==(const WasmTableType &LHS, const WasmTableType &RHS) {
525 return LHS.ElemType == RHS.ElemType && LHS.Limits == RHS.Limits;
526}
527
532
533} // end namespace wasm
534} // end namespace llvm
535
536#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_INIT_FUNCS
Definition: Wasm.h:185
@ WASM_COMDAT_INFO
Definition: Wasm.h:186
@ WASM_SEGMENT_INFO
Definition: Wasm.h:184
@ WASM_SYMBOL_TABLE
Definition: Wasm.h:187
const unsigned WASM_SYMBOL_UNDEFINED
Definition: Wasm.h:235
const uint32_t WasmPageSize
Definition: Wasm.h:32
const unsigned WASM_SYMBOL_NO_STRIP
Definition: Wasm.h:238
@ WASM_OPCODE_BR
Definition: Wasm.h:131
@ WASM_OPCODE_I32_ATOMIC_STORE
Definition: Wasm.h:142
@ WASM_OPCODE_MEMORY_FILL
Definition: Wasm.h:137
@ WASM_OPCODE_DATA_DROP
Definition: Wasm.h:138
@ WASM_OPCODE_BR_TABLE
Definition: Wasm.h:132
@ WASM_OPCODE_I32_ATOMIC_WAIT
Definition: Wasm.h:141
@ WASM_OPCODE_MISC_PREFIX
Definition: Wasm.h:135
@ WASM_OPCODE_BLOCK
Definition: Wasm.h:130
@ WASM_OPCODE_ATOMIC_NOTIFY
Definition: Wasm.h:140
@ WASM_OPCODE_RETURN
Definition: Wasm.h:133
@ WASM_OPCODE_I32_RMW_CMPXCHG
Definition: Wasm.h:143
@ WASM_OPCODE_MEMORY_INIT
Definition: Wasm.h:136
@ WASM_OPCODE_DROP
Definition: Wasm.h:134
@ WASM_OPCODE_ATOMICS_PREFIX
Definition: Wasm.h:139
const char WasmMagic[]
Definition: Wasm.h:26
@ WASM_COMDAT_SECTION
Definition: Wasm.h:203
@ WASM_COMDAT_FUNCTION
Definition: Wasm.h:201
@ WASM_COMDAT_DATA
Definition: Wasm.h:200
@ WASM_FEATURE_PREFIX_USED
Definition: Wasm.h:168
@ WASM_FEATURE_PREFIX_REQUIRED
Definition: Wasm.h:169
@ WASM_FEATURE_PREFIX_DISALLOWED
Definition: Wasm.h:170
@ WASM_DATA_SEGMENT_IS_PASSIVE
Definition: Wasm.h:154
@ WASM_DATA_SEGMENT_HAS_MEMINDEX
Definition: Wasm.h:155
@ WASM_OPCODE_ARRAY_NEW_FIXED
Definition: Wasm.h:122
@ WASM_OPCODE_REF_I31
Definition: Wasm.h:123
@ WASM_OPCODE_ARRAY_NEW_DEFAULT
Definition: Wasm.h:121
@ WASM_OPCODE_STRUCT_NEW
Definition: Wasm.h:118
@ WASM_OPCODE_STRUCT_NEW_DEFAULT
Definition: Wasm.h:119
@ WASM_OPCODE_ARRAY_NEW
Definition: Wasm.h:120
@ WASM_NAMES_LOCAL
Definition: Wasm.h:177
@ WASM_NAMES_DATA_SEGMENT
Definition: Wasm.h:179
@ WASM_NAMES_GLOBAL
Definition: Wasm.h:178
@ WASM_NAMES_FUNCTION
Definition: Wasm.h:176
@ WASM_NAMES_MODULE
Definition: Wasm.h:175
const unsigned WASM_SYMBOL_BINDING_GLOBAL
Definition: Wasm.h:230
const unsigned WASM_ELEM_SEGMENT_MASK_HAS_ELEM_KIND
Definition: Wasm.h:164
WasmTagAttribute
Definition: Wasm.h:223
@ WASM_TAG_ATTRIBUTE_EXCEPTION
Definition: Wasm.h:224
const unsigned WASM_SYMBOL_TLS
Definition: Wasm.h:239
@ WASM_LIMITS_FLAG_HAS_MAX
Definition: Wasm.h:148
@ WASM_LIMITS_FLAG_IS_SHARED
Definition: Wasm.h:149
@ WASM_LIMITS_FLAG_IS_64
Definition: Wasm.h:150
@ WASM_LIMITS_FLAG_NONE
Definition: Wasm.h:147
const uint32_t WasmMetadataVersion
Definition: Wasm.h:30
const unsigned WASM_SYMBOL_BINDING_WEAK
Definition: Wasm.h:231
const unsigned WASM_SYMBOL_BINDING_LOCAL
Definition: Wasm.h:232
llvm::StringRef toString(WasmSymbolType type)
Definition: Wasm.cpp:11
WasmSymbolType
Definition: Wasm.h:207
@ WASM_SYMBOL_TYPE_GLOBAL
Definition: Wasm.h:210
@ WASM_SYMBOL_TYPE_DATA
Definition: Wasm.h:209
@ WASM_SYMBOL_TYPE_TAG
Definition: Wasm.h:212
@ WASM_SYMBOL_TYPE_TABLE
Definition: Wasm.h:213
@ WASM_SYMBOL_TYPE_SECTION
Definition: Wasm.h:211
@ WASM_SYMBOL_TYPE_FUNCTION
Definition: Wasm.h:208
const uint32_t WasmVersion
Definition: Wasm.h:28
@ WASM_ELEM_SEGMENT_HAS_INIT_EXPRS
Definition: Wasm.h:162
@ WASM_ELEM_SEGMENT_IS_DECLARATIVE
Definition: Wasm.h:160
@ WASM_ELEM_SEGMENT_HAS_TABLE_NUMBER
Definition: Wasm.h:161
@ WASM_ELEM_SEGMENT_IS_PASSIVE
Definition: Wasm.h:159
@ 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_DYLINK_NEEDED
Definition: Wasm.h:193
@ WASM_DYLINK_MEM_INFO
Definition: Wasm.h:192
@ WASM_DYLINK_EXPORT_INFO
Definition: Wasm.h:194
@ WASM_DYLINK_IMPORT_INFO
Definition: Wasm.h:195
const unsigned WASM_SYMBOL_EXPORTED
Definition: Wasm.h:236
const unsigned WASM_SYMBOL_BINDING_MASK
Definition: Wasm.h:227
bool relocTypeHasAddend(uint32_t type)
Definition: Wasm.cpp:66
@ WASM_EXTERNAL_TABLE
Definition: Wasm.h:84
@ WASM_EXTERNAL_FUNCTION
Definition: Wasm.h:83
@ WASM_EXTERNAL_TAG
Definition: Wasm.h:87
@ WASM_EXTERNAL_MEMORY
Definition: Wasm.h:85
@ WASM_EXTERNAL_GLOBAL
Definition: Wasm.h:86
@ WASM_TYPE_NULLFUNCREF
Definition: Wasm.h:59
@ WASM_TYPE_ARRAY
Definition: Wasm.h:73
@ WASM_TYPE_NULLREF
Definition: Wasm.h:61
@ WASM_TYPE_NULLABLE
Definition: Wasm.h:71
@ WASM_TYPE_I64
Definition: Wasm.h:55
@ WASM_TYPE_F64
Definition: Wasm.h:57
@ WASM_TYPE_FUNCREF
Definition: Wasm.h:62
@ WASM_TYPE_STRUCTREF
Definition: Wasm.h:67
@ WASM_TYPE_ARRAYREF
Definition: Wasm.h:68
@ WASM_TYPE_ANYREF
Definition: Wasm.h:64
@ WASM_TYPE_EQREF
Definition: Wasm.h:65
@ WASM_TYPE_REC
Definition: Wasm.h:77
@ WASM_TYPE_NULLEXTERNREF
Definition: Wasm.h:60
@ WASM_TYPE_EXTERNREF
Definition: Wasm.h:63
@ WASM_TYPE_SUB
Definition: Wasm.h:75
@ WASM_TYPE_FUNC
Definition: Wasm.h:72
@ WASM_TYPE_I31REF
Definition: Wasm.h:66
@ WASM_TYPE_STRUCT
Definition: Wasm.h:74
@ WASM_TYPE_NONNULLABLE
Definition: Wasm.h:70
@ WASM_TYPE_I32
Definition: Wasm.h:54
@ WASM_TYPE_NORESULT
Definition: Wasm.h:78
@ WASM_TYPE_F32
Definition: Wasm.h:56
@ WASM_TYPE_V128
Definition: Wasm.h:58
@ WASM_TYPE_SUB_FINAL
Definition: Wasm.h:76
@ WASM_TYPE_EXNREF
Definition: Wasm.h:69
WasmSegmentFlag
Definition: Wasm.h:216
@ WASM_SEG_FLAG_RETAIN
Definition: Wasm.h:219
@ WASM_SEG_FLAG_TLS
Definition: Wasm.h:218
@ WASM_SEG_FLAG_STRINGS
Definition: Wasm.h:217
@ WASM_OPCODE_LOCAL_SET
Definition: Wasm.h:95
@ WASM_OPCODE_CALL
Definition: Wasm.h:93
@ WASM_OPCODE_LOCAL_GET
Definition: Wasm.h:94
@ WASM_OPCODE_I64_ADD
Definition: Wasm.h:108
@ WASM_OPCODE_I32_SUB
Definition: Wasm.h:106
@ WASM_OPCODE_F64_CONST
Definition: Wasm.h:104
@ WASM_OPCODE_END
Definition: Wasm.h:92
@ WASM_OPCODE_I64_MUL
Definition: Wasm.h:110
@ WASM_OPCODE_GLOBAL_SET
Definition: Wasm.h:98
@ WASM_OPCODE_REF_NULL
Definition: Wasm.h:111
@ WASM_OPCODE_GC_PREFIX
Definition: Wasm.h:113
@ WASM_OPCODE_REF_FUNC
Definition: Wasm.h:112
@ WASM_OPCODE_F32_CONST
Definition: Wasm.h:103
@ WASM_OPCODE_GLOBAL_GET
Definition: Wasm.h:97
@ WASM_OPCODE_I64_SUB
Definition: Wasm.h:109
@ WASM_OPCODE_I32_MUL
Definition: Wasm.h:107
@ WASM_OPCODE_I32_ADD
Definition: Wasm.h:105
@ WASM_OPCODE_LOCAL_TEE
Definition: Wasm.h:96
@ WASM_OPCODE_I32_STORE
Definition: Wasm.h:99
@ WASM_OPCODE_I64_CONST
Definition: Wasm.h:102
@ WASM_OPCODE_I64_STORE
Definition: Wasm.h:100
@ WASM_OPCODE_I32_CONST
Definition: Wasm.h:101
bool operator!=(const WasmSignature &LHS, const WasmSignature &RHS)
Definition: Wasm.h:506
llvm::StringRef sectionTypeToString(uint32_t type)
Definition: Wasm.cpp:41
const unsigned WASM_SYMBOL_EXPLICIT_NAME
Definition: Wasm.h:237
const unsigned WASM_SYMBOL_ABSOLUTE
Definition: Wasm.h:240
bool operator==(const WasmSignature &LHS, const WasmSignature &RHS)
Definition: Wasm.h:501
const unsigned WASM_SYMBOL_VISIBILITY_MASK
Definition: Wasm.h:228
const unsigned WASM_SYMBOL_VISIBILITY_HIDDEN
Definition: Wasm.h:234
llvm::StringRef relocTypetoString(uint32_t type)
Definition: Wasm.cpp:29
const unsigned WASM_SYMBOL_VISIBILITY_DEFAULT
Definition: Wasm.h:233
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
ArrayRef< uint8_t > Content
Definition: Wasm.h:402
WasmInitExpr Offset
Definition: Wasm.h:400
uint32_t MemoryAlignment
Definition: Wasm.h:282
std::vector< StringRef > Needed
Definition: Wasm.h:285
std::vector< WasmDylinkExportInfo > ExportInfo
Definition: Wasm.h:287
std::vector< WasmDylinkImportInfo > ImportInfo
Definition: Wasm.h:286
uint32_t TableAlignment
Definition: Wasm.h:284
WasmInitExpr Offset
Definition: Wasm.h:418
std::vector< uint32_t > Functions
Definition: Wasm.h:419
StringRef Name
Definition: Wasm.h:302
uint32_t Index
Definition: Wasm.h:304
uint32_t CodeOffset
Definition: Wasm.h:388
ArrayRef< uint8_t > Body
Definition: Wasm.h:385
std::optional< StringRef > ExportName
Definition: Wasm.h:389
std::vector< WasmLocalDecl > Locals
Definition: Wasm.h:384
StringRef SymbolName
Definition: Wasm.h:390
uint32_t CodeSectionOffset
Definition: Wasm.h:386
StringRef DebugName
Definition: Wasm.h:391
uint32_t Offset
Definition: Wasm.h:354
WasmInitExpr InitExpr
Definition: Wasm.h:352
StringRef SymbolName
Definition: Wasm.h:353
WasmGlobalType Type
Definition: Wasm.h:351
uint32_t Index
Definition: Wasm.h:350
WasmLimits Memory
Definition: Wasm.h:372
StringRef Field
Definition: Wasm.h:366
WasmGlobalType Global
Definition: Wasm.h:370
StringRef Module
Definition: Wasm.h:365
uint32_t SigIndex
Definition: Wasm.h:369
WasmTableType Table
Definition: Wasm.h:371
union llvm::wasm::WasmInitExprMVP::@178 Value
WasmInitExprMVP Inst
Definition: Wasm.h:340
ArrayRef< uint8_t > Body
Definition: Wasm.h:341
uint64_t Minimum
Definition: Wasm.h:309
uint64_t Maximum
Definition: Wasm.h:310
std::vector< WasmInitFunc > InitFunctions
Definition: Wasm.h:476
std::vector< StringRef > Comdats
Definition: Wasm.h:477
std::vector< std::pair< std::string, std::string > > SDKs
Definition: Wasm.h:293
std::vector< std::pair< std::string, std::string > > Languages
Definition: Wasm.h:291
std::vector< std::pair< std::string, std::string > > Tools
Definition: Wasm.h:292
enum llvm::wasm::WasmSignature::@183 Kind
WasmSignature(SmallVector< ValType, 1 > &&InReturns, SmallVector< ValType, 4 > &&InParams)
Definition: Wasm.h:494
SmallVector< ValType, 1 > Returns
Definition: Wasm.h:485
SmallVector< ValType, 4 > Params
Definition: Wasm.h:486
enum llvm::wasm::WasmSignature::@184 State
std::optional< StringRef > ExportName
Definition: Wasm.h:451
WasmDataReference DataRef
Definition: Wasm.h:457
std::optional< StringRef > ImportModule
Definition: Wasm.h:447
std::optional< StringRef > ImportName
Definition: Wasm.h:449
WasmLimits Limits
Definition: Wasm.h:315
WasmTableType Type
Definition: Wasm.h:320
StringRef SymbolName
Definition: Wasm.h:321
uint32_t Index
Definition: Wasm.h:319
uint32_t Index
Definition: Wasm.h:359
uint32_t SigIndex
Definition: Wasm.h:360
StringRef SymbolName
Definition: Wasm.h:361