LLVM 23.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"
21#include <optional>
22
23namespace llvm {
24namespace wasm {
25
26// Object file magic string.
27const char WasmMagic[] = {'\0', 'a', 's', 'm'};
28// Wasm binary format version
30// Wasm linking metadata version
32// Wasm uses a 64k page size by default (but the custom-page-sizes proposal
33// allows changing it)
35
36enum : unsigned {
37 WASM_SEC_CUSTOM = 0, // Custom / User-defined section
38 WASM_SEC_TYPE = 1, // Function signature declarations
39 WASM_SEC_IMPORT = 2, // Import declarations
40 WASM_SEC_FUNCTION = 3, // Function declarations
41 WASM_SEC_TABLE = 4, // Indirect function table and other tables
42 WASM_SEC_MEMORY = 5, // Memory attributes
43 WASM_SEC_GLOBAL = 6, // Global declarations
44 WASM_SEC_EXPORT = 7, // Exports
45 WASM_SEC_START = 8, // Start function declaration
46 WASM_SEC_ELEM = 9, // Elements section
47 WASM_SEC_CODE = 10, // Function bodies (code)
48 WASM_SEC_DATA = 11, // Data segments
49 WASM_SEC_DATACOUNT = 12, // Data segment count
50 WASM_SEC_TAG = 13, // Tag declarations
52};
53
54// Type immediate encodings used in various contexts.
55enum : unsigned {
81 WASM_TYPE_NORESULT = 0x40, // for blocks with no result values
82};
83
84// Memory ordering encodings for atomic instructions.
85enum : unsigned {
88 // RMW/CMPXCHG operations have 2 orderings but they must currently match.
90};
91const unsigned WASM_MEMARG_HAS_MEM_ORDER = 0x20;
92
93// Kinds of externals (for imports and exports).
94enum : unsigned {
100};
101
102// Opcodes used in initializer expressions.
103enum : unsigned {
126};
127
128// Opcodes in the GC-prefixed space (0xfb)
129enum : unsigned {
136 // any.convert_extern and extern.convert_any don't seem to be supported by
137 // Binaryen.
138};
139
140// Opcodes used in synthetic functions.
141enum : unsigned {
156};
157
158// Sub-opcodes for catch clauses in a try_table instruction
159enum : unsigned {
164};
165
166enum : unsigned {
172};
173
174enum : unsigned {
177};
178
179enum : unsigned {
181 WASM_ELEM_SEGMENT_IS_DECLARATIVE = 0x02, // if passive == 1
182 WASM_ELEM_SEGMENT_HAS_TABLE_NUMBER = 0x02, // if passive == 0
184};
186
187// Feature policy prefixes used in the custom "target_features" section
188enum : uint8_t {
191};
192
193// Kind codes used in the custom "name" section
194enum : unsigned {
200};
201
202// Kind codes used in the custom "linking" section
203enum : unsigned {
208};
209
210// Kind codes used in the custom "dylink" section
211enum : unsigned {
217};
218
219// Kind codes used in the custom "linking" section in the WASM_COMDAT_INFO
220enum : unsigned {
223 // GLOBAL, TAG, and TABLE are in here but LLVM doesn't use them yet.
225};
226
227// Kind codes used in the custom "linking" section in the WASM_SYMBOL_TABLE
236
242
243// Kinds of tag attributes.
247
248const unsigned WASM_SYMBOL_BINDING_MASK = 0x3;
249const unsigned WASM_SYMBOL_VISIBILITY_MASK = 0xc;
250
251const unsigned WASM_SYMBOL_BINDING_GLOBAL = 0x0;
252const unsigned WASM_SYMBOL_BINDING_WEAK = 0x1;
253const unsigned WASM_SYMBOL_BINDING_LOCAL = 0x2;
255const unsigned WASM_SYMBOL_VISIBILITY_HIDDEN = 0x4;
256const unsigned WASM_SYMBOL_UNDEFINED = 0x10;
257const unsigned WASM_SYMBOL_EXPORTED = 0x20;
258const unsigned WASM_SYMBOL_EXPLICIT_NAME = 0x40;
259const unsigned WASM_SYMBOL_NO_STRIP = 0x80;
260const unsigned WASM_SYMBOL_TLS = 0x100;
261const unsigned WASM_SYMBOL_ABSOLUTE = 0x200;
262
263#define WASM_RELOC(name, value) name = value,
264
265enum WasmRelocType : unsigned {
266#include "WasmRelocs.def"
267};
268
269#undef WASM_RELOC
270
275
276// Subset of types that a value can have
277enum class ValType {
286 // Unmodeled value types include ref types with heap types other than
287 // func, extern or exn, and type-specialized funcrefs
288 OTHERREF = 0xff,
289};
290
296
301
303 uint32_t MemorySize; // Memory size in bytes
304 uint32_t MemoryAlignment; // P2 alignment of memory
305 uint32_t TableSize; // Table size in elements
306 uint32_t TableAlignment; // P2 alignment of table
307 std::vector<StringRef> Needed; // Shared library dependencies
308 std::vector<WasmDylinkImportInfo> ImportInfo;
309 std::vector<WasmDylinkExportInfo> ExportInfo;
310 std::vector<StringRef> RuntimePath;
311};
312
314 std::vector<std::pair<std::string, std::string>> Languages;
315 std::vector<std::pair<std::string, std::string>> Tools;
316 std::vector<std::pair<std::string, std::string>> SDKs;
317};
318
321 std::string Name;
322};
323
329
336
341
342struct WasmTable {
345 StringRef SymbolName; // from the "linking" section
346};
347
358
359// Extended-const init exprs and exprs with GC types are not explicitly
360// modeled, but the raw body of the expr is attached.
362 uint8_t Extended; // Set to non-zero if extended const is used (i.e. more than
363 // one instruction)
366};
367
369 uint8_t Type; // TODO: make this a ValType?
371};
372
377 StringRef SymbolName; // from the "linking" section
378 uint32_t Offset; // Offset of the definition in the binary's Global section
379 uint32_t Size; // Size of the definition in the binary's Global section
380};
381
382struct WasmTag {
385 StringRef SymbolName; // from the "linking" section
386};
387
399
404
408 std::vector<WasmLocalDecl> Locals;
412 uint32_t CodeOffset; // start of Locals and Body
413 std::optional<StringRef> ExportName; // from the "export" section
414 StringRef SymbolName; // from the "linking" section
415 StringRef DebugName; // from the "name" section
416 uint32_t Comdat; // from the "comdat info" section
417};
418
421 // Present if InitFlags & WASM_DATA_SEGMENT_HAS_MEMINDEX.
423 // Present if InitFlags & WASM_DATA_SEGMENT_IS_PASSIVE == 0.
425
427 StringRef Name; // from the "segment info" section
430 uint32_t Comdat; // from the "comdat info" section
431};
432
433// 3 different element segment modes are encodable. This class is currently
434// only used during decoding (see WasmElemSegment below).
436
437// Represents a Wasm element segment, with some limitations compared the spec:
438// 1) Does not model passive or declarative segments (Segment will end up with
439// an Offset field of i32.const 0)
440// 2) Does not model init exprs (Segment will get an empty Functions list)
441// 3) Does not model types other than basic funcref/externref/exnref (see
442// ValType)
450
451// Represents the location of a Wasm data symbol within a WasmDataSegment, as
452// the index of the segment, and the offset and size within the segment.
458
460 uint8_t Type; // The type of the relocation.
461 uint32_t Index; // Index into either symbol or type index space.
462 uint64_t Offset; // Offset from the start of the section.
463 int64_t Addend; // A value to add to the symbol.
464
465 WasmRelocType getType() const { return static_cast<WasmRelocType>(Type); }
466};
467
472
477 // For undefined symbols the module of the import
478 std::optional<StringRef> ImportModule;
479 // For undefined symbols the name of the import
480 std::optional<StringRef> ImportName;
481 // For symbols to be exported from the final module
482 std::optional<StringRef> ExportName;
483 union {
484 // For function, table, or global symbols, the index in function, table, or
485 // global index space.
487 // For a data symbols, the address of the data relative to segment.
489 };
490};
491
497
503
504// Info from the linking metadata section of a wasm object file.
507 std::vector<WasmInitFunc> InitFunctions;
508 std::vector<StringRef> Comdats;
509 // The linking section also contains a symbol table. This info (represented
510 // in a WasmSymbolInfo struct) is stored inside the WasmSymbol object instead
511 // of in this structure; this allows vectors of WasmSymbols and
512 // WasmLinkingDatas to be reallocated.
513};
514
518 // LLVM can parse types other than functions encoded in the type section,
519 // but does not actually model them. Instead a placeholder signature is
520 // created in the Object's signature list.
521 enum { Function, Tag, Placeholder } Kind = Function;
522 // Support empty and tombstone instances, needed by DenseMap.
523 enum { Plain, Empty, Tombstone } State = Plain;
524
526 SmallVector<ValType, 4> &&InParams)
527 : Returns(InReturns), Params(InParams) {}
528 WasmSignature() = default;
529};
530
531// Useful comparison operators
532inline bool operator==(const WasmSignature &LHS, const WasmSignature &RHS) {
533 return LHS.State == RHS.State && LHS.Returns == RHS.Returns &&
534 LHS.Params == RHS.Params;
535}
536
537inline bool operator!=(const WasmSignature &LHS, const WasmSignature &RHS) {
538 return !(LHS == RHS);
539}
540
541inline bool operator==(const WasmGlobalType &LHS, const WasmGlobalType &RHS) {
542 return LHS.Type == RHS.Type && LHS.Mutable == RHS.Mutable;
543}
544
545inline bool operator!=(const WasmGlobalType &LHS, const WasmGlobalType &RHS) {
546 return !(LHS == RHS);
547}
548
549inline bool operator==(const WasmLimits &LHS, const WasmLimits &RHS) {
550 return LHS.Flags == RHS.Flags && LHS.Minimum == RHS.Minimum &&
551 (LHS.Flags & WASM_LIMITS_FLAG_HAS_MAX ? LHS.Maximum == RHS.Maximum
552 : true) &&
554 ? LHS.PageSize == RHS.PageSize
555 : true);
556}
557
558inline bool operator==(const WasmTableType &LHS, const WasmTableType &RHS) {
559 return LHS.ElemType == RHS.ElemType && LHS.Limits == RHS.Limits;
560}
561
566
567} // end namespace wasm
568} // end namespace llvm
569
570#endif
#define LLVM_ABI
Definition Compiler.h:213
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:40
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
Definition StringRef.h:55
LLVM Value Representation.
Definition Value.h:75
const unsigned WASM_SYMBOL_UNDEFINED
Definition Wasm.h:256
@ WASM_NAMES_LOCAL
Definition Wasm.h:197
@ WASM_NAMES_DATA_SEGMENT
Definition Wasm.h:199
@ WASM_NAMES_GLOBAL
Definition Wasm.h:198
@ WASM_NAMES_FUNCTION
Definition Wasm.h:196
@ WASM_NAMES_MODULE
Definition Wasm.h:195
const unsigned WASM_SYMBOL_NO_STRIP
Definition Wasm.h:259
@ WASM_TYPE_NULLFUNCREF
Definition Wasm.h:61
@ WASM_TYPE_ARRAY
Definition Wasm.h:76
@ WASM_TYPE_NULLREF
Definition Wasm.h:64
@ WASM_TYPE_NULLABLE
Definition Wasm.h:74
@ WASM_TYPE_I64
Definition Wasm.h:57
@ WASM_TYPE_F64
Definition Wasm.h:59
@ WASM_TYPE_FUNCREF
Definition Wasm.h:65
@ WASM_TYPE_STRUCTREF
Definition Wasm.h:71
@ WASM_TYPE_ARRAYREF
Definition Wasm.h:72
@ WASM_TYPE_ANYREF
Definition Wasm.h:68
@ WASM_TYPE_EQREF
Definition Wasm.h:69
@ WASM_TYPE_REC
Definition Wasm.h:80
@ WASM_TYPE_NULLEXTERNREF
Definition Wasm.h:62
@ WASM_TYPE_EXTERNREF
Definition Wasm.h:66
@ WASM_TYPE_SUB
Definition Wasm.h:78
@ WASM_TYPE_FUNC
Definition Wasm.h:75
@ WASM_TYPE_I31REF
Definition Wasm.h:70
@ WASM_TYPE_STRUCT
Definition Wasm.h:77
@ WASM_TYPE_NULLEXNREF
Definition Wasm.h:63
@ WASM_TYPE_NONNULLABLE
Definition Wasm.h:73
@ WASM_TYPE_I32
Definition Wasm.h:56
@ WASM_TYPE_NORESULT
Definition Wasm.h:81
@ WASM_TYPE_F32
Definition Wasm.h:58
@ WASM_TYPE_V128
Definition Wasm.h:60
@ WASM_TYPE_SUB_FINAL
Definition Wasm.h:79
@ WASM_TYPE_EXNREF
Definition Wasm.h:67
const char WasmMagic[]
Definition Wasm.h:27
@ WASM_OPCODE_BR
Definition Wasm.h:143
@ WASM_OPCODE_I32_ATOMIC_STORE
Definition Wasm.h:154
@ WASM_OPCODE_MEMORY_FILL
Definition Wasm.h:149
@ WASM_OPCODE_DATA_DROP
Definition Wasm.h:150
@ WASM_OPCODE_BR_TABLE
Definition Wasm.h:144
@ WASM_OPCODE_I32_ATOMIC_WAIT
Definition Wasm.h:153
@ WASM_OPCODE_MISC_PREFIX
Definition Wasm.h:147
@ WASM_OPCODE_BLOCK
Definition Wasm.h:142
@ WASM_OPCODE_ATOMIC_NOTIFY
Definition Wasm.h:152
@ WASM_OPCODE_RETURN
Definition Wasm.h:145
@ WASM_OPCODE_I32_RMW_CMPXCHG
Definition Wasm.h:155
@ WASM_OPCODE_MEMORY_INIT
Definition Wasm.h:148
@ WASM_OPCODE_DROP
Definition Wasm.h:146
@ WASM_OPCODE_ATOMICS_PREFIX
Definition Wasm.h:151
const unsigned WASM_SYMBOL_BINDING_GLOBAL
Definition Wasm.h:251
WasmTagAttribute
Definition Wasm.h:244
@ WASM_TAG_ATTRIBUTE_EXCEPTION
Definition Wasm.h:245
const unsigned WASM_SYMBOL_TLS
Definition Wasm.h:260
const uint32_t WasmMetadataVersion
Definition Wasm.h:31
const unsigned WASM_SYMBOL_BINDING_WEAK
Definition Wasm.h:252
@ WASM_SEC_CODE
Definition Wasm.h:47
@ WASM_SEC_MEMORY
Definition Wasm.h:42
@ WASM_SEC_IMPORT
Definition Wasm.h:39
@ WASM_SEC_EXPORT
Definition Wasm.h:44
@ WASM_SEC_DATACOUNT
Definition Wasm.h:49
@ WASM_SEC_LAST_KNOWN
Definition Wasm.h:51
@ WASM_SEC_CUSTOM
Definition Wasm.h:37
@ WASM_SEC_FUNCTION
Definition Wasm.h:40
@ WASM_SEC_ELEM
Definition Wasm.h:46
@ WASM_SEC_START
Definition Wasm.h:45
@ WASM_SEC_TABLE
Definition Wasm.h:41
@ WASM_SEC_TYPE
Definition Wasm.h:38
@ WASM_SEC_TAG
Definition Wasm.h:50
@ WASM_SEC_GLOBAL
Definition Wasm.h:43
@ WASM_SEC_DATA
Definition Wasm.h:48
const unsigned WASM_SYMBOL_BINDING_LOCAL
Definition Wasm.h:253
@ WASM_OPCODE_CATCH_ALL_REF
Definition Wasm.h:163
@ WASM_OPCODE_CATCH
Definition Wasm.h:160
@ WASM_OPCODE_CATCH_ALL
Definition Wasm.h:162
@ WASM_OPCODE_CATCH_REF
Definition Wasm.h:161
@ WASM_LIMITS_FLAG_HAS_MAX
Definition Wasm.h:168
@ WASM_LIMITS_FLAG_IS_SHARED
Definition Wasm.h:169
@ WASM_LIMITS_FLAG_IS_64
Definition Wasm.h:170
@ WASM_LIMITS_FLAG_NONE
Definition Wasm.h:167
@ WASM_LIMITS_FLAG_HAS_PAGE_SIZE
Definition Wasm.h:171
LLVM_ABI llvm::StringRef toString(WasmSymbolType type)
Definition Wasm.cpp:11
@ WASM_FEATURE_PREFIX_USED
Definition Wasm.h:189
@ WASM_FEATURE_PREFIX_DISALLOWED
Definition Wasm.h:190
WasmSymbolType
Definition Wasm.h:228
@ WASM_SYMBOL_TYPE_GLOBAL
Definition Wasm.h:231
@ WASM_SYMBOL_TYPE_DATA
Definition Wasm.h:230
@ WASM_SYMBOL_TYPE_TAG
Definition Wasm.h:233
@ WASM_SYMBOL_TYPE_TABLE
Definition Wasm.h:234
@ WASM_SYMBOL_TYPE_SECTION
Definition Wasm.h:232
@ WASM_SYMBOL_TYPE_FUNCTION
Definition Wasm.h:229
const uint32_t WasmVersion
Definition Wasm.h:29
ElemSegmentMode
Definition Wasm.h:435
const unsigned WASM_SYMBOL_EXPORTED
Definition Wasm.h:257
const unsigned WASM_SYMBOL_BINDING_MASK
Definition Wasm.h:248
@ WASM_ELEM_SEGMENT_HAS_INIT_EXPRS
Definition Wasm.h:183
@ WASM_ELEM_SEGMENT_IS_DECLARATIVE
Definition Wasm.h:181
@ WASM_ELEM_SEGMENT_HAS_TABLE_NUMBER
Definition Wasm.h:182
@ WASM_ELEM_SEGMENT_IS_PASSIVE
Definition Wasm.h:180
@ WASM_DYLINK_RUNTIME_PATH
Definition Wasm.h:216
@ WASM_DYLINK_NEEDED
Definition Wasm.h:213
@ WASM_DYLINK_MEM_INFO
Definition Wasm.h:212
@ WASM_DYLINK_EXPORT_INFO
Definition Wasm.h:214
@ WASM_DYLINK_IMPORT_INFO
Definition Wasm.h:215
@ WASM_DATA_SEGMENT_IS_PASSIVE
Definition Wasm.h:175
@ WASM_DATA_SEGMENT_HAS_MEMINDEX
Definition Wasm.h:176
LLVM_ABI bool relocTypeHasAddend(uint32_t type)
Definition Wasm.cpp:66
@ WASM_EXTERNAL_TABLE
Definition Wasm.h:96
@ WASM_EXTERNAL_FUNCTION
Definition Wasm.h:95
@ WASM_EXTERNAL_TAG
Definition Wasm.h:99
@ WASM_EXTERNAL_MEMORY
Definition Wasm.h:97
@ WASM_EXTERNAL_GLOBAL
Definition Wasm.h:98
@ WASM_MEM_ORDER_SEQ_CST
Definition Wasm.h:86
@ WASM_MEM_ORDER_RMW_ACQ_REL
Definition Wasm.h:89
@ WASM_MEM_ORDER_ACQ_REL
Definition Wasm.h:87
@ WASM_INIT_FUNCS
Definition Wasm.h:205
@ WASM_COMDAT_INFO
Definition Wasm.h:206
@ WASM_SEGMENT_INFO
Definition Wasm.h:204
@ WASM_SYMBOL_TABLE
Definition Wasm.h:207
@ WASM_COMDAT_SECTION
Definition Wasm.h:224
@ WASM_COMDAT_FUNCTION
Definition Wasm.h:222
@ WASM_COMDAT_DATA
Definition Wasm.h:221
@ WASM_OPCODE_LOCAL_SET
Definition Wasm.h:107
@ WASM_OPCODE_CALL
Definition Wasm.h:105
@ WASM_OPCODE_LOCAL_GET
Definition Wasm.h:106
@ WASM_OPCODE_I64_ADD
Definition Wasm.h:120
@ WASM_OPCODE_I32_SUB
Definition Wasm.h:118
@ WASM_OPCODE_F64_CONST
Definition Wasm.h:116
@ WASM_OPCODE_END
Definition Wasm.h:104
@ WASM_OPCODE_I64_MUL
Definition Wasm.h:122
@ WASM_OPCODE_GLOBAL_SET
Definition Wasm.h:110
@ WASM_OPCODE_REF_NULL
Definition Wasm.h:123
@ WASM_OPCODE_GC_PREFIX
Definition Wasm.h:125
@ WASM_OPCODE_REF_FUNC
Definition Wasm.h:124
@ WASM_OPCODE_F32_CONST
Definition Wasm.h:115
@ WASM_OPCODE_GLOBAL_GET
Definition Wasm.h:109
@ WASM_OPCODE_I64_SUB
Definition Wasm.h:121
@ WASM_OPCODE_I32_MUL
Definition Wasm.h:119
@ WASM_OPCODE_I32_ADD
Definition Wasm.h:117
@ WASM_OPCODE_LOCAL_TEE
Definition Wasm.h:108
@ WASM_OPCODE_I32_STORE
Definition Wasm.h:111
@ WASM_OPCODE_I64_CONST
Definition Wasm.h:114
@ WASM_OPCODE_I64_STORE
Definition Wasm.h:112
@ WASM_OPCODE_I32_CONST
Definition Wasm.h:113
WasmSegmentFlag
Definition Wasm.h:237
@ WASM_SEG_FLAG_RETAIN
Definition Wasm.h:240
@ WASM_SEG_FLAG_TLS
Definition Wasm.h:239
@ WASM_SEG_FLAG_STRINGS
Definition Wasm.h:238
WasmRelocType
Definition Wasm.h:265
bool operator!=(const WasmSignature &LHS, const WasmSignature &RHS)
Definition Wasm.h:537
LLVM_ABI llvm::StringRef sectionTypeToString(uint32_t type)
Definition Wasm.cpp:41
const uint32_t WasmDefaultPageSize
Definition Wasm.h:34
const unsigned WASM_MEMARG_HAS_MEM_ORDER
Definition Wasm.h:91
const unsigned WASM_SYMBOL_EXPLICIT_NAME
Definition Wasm.h:258
const unsigned WASM_SYMBOL_ABSOLUTE
Definition Wasm.h:261
bool operator==(const WasmSignature &LHS, const WasmSignature &RHS)
Definition Wasm.h:532
const unsigned WASM_SYMBOL_VISIBILITY_MASK
Definition Wasm.h:249
const unsigned WASM_SYMBOL_VISIBILITY_HIDDEN
Definition Wasm.h:255
const unsigned WASM_ELEM_SEGMENT_MASK_HAS_ELEM_DESC
Definition Wasm.h:185
LLVM_ABI llvm::StringRef relocTypetoString(uint32_t type)
Definition Wasm.cpp:29
const unsigned WASM_SYMBOL_VISIBILITY_DEFAULT
Definition Wasm.h:254
@ WASM_OPCODE_ARRAY_NEW_FIXED
Definition Wasm.h:134
@ WASM_OPCODE_REF_I31
Definition Wasm.h:135
@ WASM_OPCODE_ARRAY_NEW_DEFAULT
Definition Wasm.h:133
@ WASM_OPCODE_STRUCT_NEW
Definition Wasm.h:130
@ WASM_OPCODE_STRUCT_NEW_DEFAULT
Definition Wasm.h:131
@ WASM_OPCODE_ARRAY_NEW
Definition Wasm.h:132
This is an optimization pass for GlobalISel generic memory operations.
Definition Types.h:26
ArrayRef< uint8_t > Content
Definition Wasm.h:426
WasmInitExpr Offset
Definition Wasm.h:424
std::vector< StringRef > Needed
Definition Wasm.h:307
std::vector< StringRef > RuntimePath
Definition Wasm.h:310
std::vector< WasmDylinkExportInfo > ExportInfo
Definition Wasm.h:309
std::vector< WasmDylinkImportInfo > ImportInfo
Definition Wasm.h:308
WasmInitExpr Offset
Definition Wasm.h:447
std::vector< uint32_t > Functions
Definition Wasm.h:448
ArrayRef< uint8_t > Body
Definition Wasm.h:409
std::optional< StringRef > ExportName
Definition Wasm.h:413
std::vector< WasmLocalDecl > Locals
Definition Wasm.h:408
StringRef SymbolName
Definition Wasm.h:414
uint32_t CodeSectionOffset
Definition Wasm.h:410
StringRef DebugName
Definition Wasm.h:415
WasmInitExpr InitExpr
Definition Wasm.h:376
StringRef SymbolName
Definition Wasm.h:377
WasmGlobalType Type
Definition Wasm.h:375
WasmLimits Memory
Definition Wasm.h:396
StringRef Field
Definition Wasm.h:390
WasmGlobalType Global
Definition Wasm.h:394
StringRef Module
Definition Wasm.h:389
uint32_t SigIndex
Definition Wasm.h:393
WasmTableType Table
Definition Wasm.h:395
WasmInitExprMVP Inst
Definition Wasm.h:364
ArrayRef< uint8_t > Body
Definition Wasm.h:365
uint32_t PageSize
Definition Wasm.h:334
std::vector< WasmInitFunc > InitFunctions
Definition Wasm.h:507
std::vector< StringRef > Comdats
Definition Wasm.h:508
std::vector< std::pair< std::string, std::string > > SDKs
Definition Wasm.h:316
std::vector< std::pair< std::string, std::string > > Languages
Definition Wasm.h:314
std::vector< std::pair< std::string, std::string > > Tools
Definition Wasm.h:315
WasmRelocType getType() const
Definition Wasm.h:465
WasmSignature(SmallVector< ValType, 1 > &&InReturns, SmallVector< ValType, 4 > &&InParams)
Definition Wasm.h:525
SmallVector< ValType, 1 > Returns
Definition Wasm.h:516
SmallVector< ValType, 4 > Params
Definition Wasm.h:517
std::optional< StringRef > ExportName
Definition Wasm.h:482
WasmDataReference DataRef
Definition Wasm.h:488
std::optional< StringRef > ImportModule
Definition Wasm.h:478
std::optional< StringRef > ImportName
Definition Wasm.h:480
WasmTableType Type
Definition Wasm.h:344
StringRef SymbolName
Definition Wasm.h:345
uint32_t Index
Definition Wasm.h:383
uint32_t SigIndex
Definition Wasm.h:384
StringRef SymbolName
Definition Wasm.h:385