LLVM 22.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// Kinds of externals (for imports and exports).
85enum : unsigned {
91};
92
93// Opcodes used in initializer expressions.
94enum : unsigned {
117};
118
119// Opcodes in the GC-prefixed space (0xfb)
120enum : unsigned {
127 // any.convert_extern and extern.convert_any don't seem to be supported by
128 // Binaryen.
129};
130
131// Opcodes used in synthetic functions.
132enum : unsigned {
147};
148
149// Sub-opcodes for catch clauses in a try_table instruction
150enum : unsigned {
155};
156
157enum : unsigned {
163};
164
165enum : unsigned {
168};
169
170enum : unsigned {
172 WASM_ELEM_SEGMENT_IS_DECLARATIVE = 0x02, // if passive == 1
173 WASM_ELEM_SEGMENT_HAS_TABLE_NUMBER = 0x02, // if passive == 0
175};
177
178// Feature policy prefixes used in the custom "target_features" section
179enum : uint8_t {
182};
183
184// Kind codes used in the custom "name" section
185enum : unsigned {
191};
192
193// Kind codes used in the custom "linking" section
194enum : unsigned {
199};
200
201// Kind codes used in the custom "dylink" section
202enum : unsigned {
208};
209
210// Kind codes used in the custom "linking" section in the WASM_COMDAT_INFO
211enum : unsigned {
214 // GLOBAL, TAG, and TABLE are in here but LLVM doesn't use them yet.
216};
217
218// Kind codes used in the custom "linking" section in the WASM_SYMBOL_TABLE
219enum WasmSymbolType : unsigned {
226};
227
228enum WasmSegmentFlag : unsigned {
232};
233
234// Kinds of tag attributes.
237};
238
239const unsigned WASM_SYMBOL_BINDING_MASK = 0x3;
240const unsigned WASM_SYMBOL_VISIBILITY_MASK = 0xc;
241
242const unsigned WASM_SYMBOL_BINDING_GLOBAL = 0x0;
243const unsigned WASM_SYMBOL_BINDING_WEAK = 0x1;
244const unsigned WASM_SYMBOL_BINDING_LOCAL = 0x2;
246const unsigned WASM_SYMBOL_VISIBILITY_HIDDEN = 0x4;
247const unsigned WASM_SYMBOL_UNDEFINED = 0x10;
248const unsigned WASM_SYMBOL_EXPORTED = 0x20;
249const unsigned WASM_SYMBOL_EXPLICIT_NAME = 0x40;
250const unsigned WASM_SYMBOL_NO_STRIP = 0x80;
251const unsigned WASM_SYMBOL_TLS = 0x100;
252const unsigned WASM_SYMBOL_ABSOLUTE = 0x200;
253
254#define WASM_RELOC(name, value) name = value,
255
256enum WasmRelocType : unsigned {
257#include "WasmRelocs.def"
258};
259
260#undef WASM_RELOC
261
265};
266
267// Subset of types that a value can have
268enum class ValType {
277 // Unmodeled value types include ref types with heap types other than
278 // func, extern or exn, and type-specialized funcrefs
279 OTHERREF = 0xff,
280};
281
286};
287
291};
292
294 uint32_t MemorySize; // Memory size in bytes
295 uint32_t MemoryAlignment; // P2 alignment of memory
296 uint32_t TableSize; // Table size in elements
297 uint32_t TableAlignment; // P2 alignment of table
298 std::vector<StringRef> Needed; // Shared library dependencies
299 std::vector<WasmDylinkImportInfo> ImportInfo;
300 std::vector<WasmDylinkExportInfo> ExportInfo;
301 std::vector<StringRef> RuntimePath;
302};
303
305 std::vector<std::pair<std::string, std::string>> Languages;
306 std::vector<std::pair<std::string, std::string>> Tools;
307 std::vector<std::pair<std::string, std::string>> SDKs;
308};
309
312 std::string Name;
313};
314
319};
320
326};
327
331};
332
333struct WasmTable {
336 StringRef SymbolName; // from the "linking" section
337};
338
341 union {
342 int32_t Int32;
343 int64_t Int64;
348};
349
350// Extended-const init exprs and exprs with GC types are not explicitly
351// modeled, but the raw body of the expr is attached.
353 uint8_t Extended; // Set to non-zero if extended const is used (i.e. more than
354 // one instruction)
357};
358
360 uint8_t Type; // TODO: make this a ValType?
362};
363
368 StringRef SymbolName; // from the "linking" section
369 uint32_t Offset; // Offset of the definition in the binary's Global section
370 uint32_t Size; // Size of the definition in the binary's Global section
371};
372
373struct WasmTag {
376 StringRef SymbolName; // from the "linking" section
377};
378
383 union {
388 };
389};
390
394};
395
399 std::vector<WasmLocalDecl> Locals;
403 uint32_t CodeOffset; // start of Locals and Body
404 std::optional<StringRef> ExportName; // from the "export" section
405 StringRef SymbolName; // from the "linking" section
406 StringRef DebugName; // from the "name" section
407 uint32_t Comdat; // from the "comdat info" section
408};
409
412 // Present if InitFlags & WASM_DATA_SEGMENT_HAS_MEMINDEX.
414 // Present if InitFlags & WASM_DATA_SEGMENT_IS_PASSIVE == 0.
416
418 StringRef Name; // from the "segment info" section
421 uint32_t Comdat; // from the "comdat info" section
422};
423
424// 3 different element segment modes are encodable. This class is currently
425// only used during decoding (see WasmElemSegment below).
427
428// Represents a Wasm element segment, with some limitations compared the spec:
429// 1) Does not model passive or declarative segments (Segment will end up with
430// an Offset field of i32.const 0)
431// 2) Does not model init exprs (Segment will get an empty Functions list)
432// 3) Does not model types other than basic funcref/externref/exnref (see
433// ValType)
439 std::vector<uint32_t> Functions;
440};
441
442// Represents the location of a Wasm data symbol within a WasmDataSegment, as
443// the index of the segment, and the offset and size within the segment.
448};
449
451 uint8_t Type; // The type of the relocation.
452 uint32_t Index; // Index into either symbol or type index space.
453 uint64_t Offset; // Offset from the start of the section.
454 int64_t Addend; // A value to add to the symbol.
455
456 WasmRelocType getType() const { return static_cast<WasmRelocType>(Type); }
457};
458
462};
463
468 // For undefined symbols the module of the import
469 std::optional<StringRef> ImportModule;
470 // For undefined symbols the name of the import
471 std::optional<StringRef> ImportName;
472 // For symbols to be exported from the final module
473 std::optional<StringRef> ExportName;
474 union {
475 // For function, table, or global symbols, the index in function, table, or
476 // global index space.
478 // For a data symbols, the address of the data relative to segment.
480 };
481};
482
483enum class NameType {
484 FUNCTION,
485 GLOBAL,
487};
488
493};
494
495// Info from the linking metadata section of a wasm object file.
498 std::vector<WasmInitFunc> InitFunctions;
499 std::vector<StringRef> Comdats;
500 // The linking section also contains a symbol table. This info (represented
501 // in a WasmSymbolInfo struct) is stored inside the WasmSymbol object instead
502 // of in this structure; this allows vectors of WasmSymbols and
503 // WasmLinkingDatas to be reallocated.
504};
505
509 // LLVM can parse types other than functions encoded in the type section,
510 // but does not actually model them. Instead a placeholder signature is
511 // created in the Object's signature list.
513 // Support empty and tombstone instances, needed by DenseMap.
515
517 SmallVector<ValType, 4> &&InParams)
518 : Returns(InReturns), Params(InParams) {}
519 WasmSignature() = default;
520};
521
522// Useful comparison operators
523inline bool operator==(const WasmSignature &LHS, const WasmSignature &RHS) {
524 return LHS.State == RHS.State && LHS.Returns == RHS.Returns &&
525 LHS.Params == RHS.Params;
526}
527
528inline bool operator!=(const WasmSignature &LHS, const WasmSignature &RHS) {
529 return !(LHS == RHS);
530}
531
532inline bool operator==(const WasmGlobalType &LHS, const WasmGlobalType &RHS) {
533 return LHS.Type == RHS.Type && LHS.Mutable == RHS.Mutable;
534}
535
536inline bool operator!=(const WasmGlobalType &LHS, const WasmGlobalType &RHS) {
537 return !(LHS == RHS);
538}
539
540inline bool operator==(const WasmLimits &LHS, const WasmLimits &RHS) {
541 return LHS.Flags == RHS.Flags && LHS.Minimum == RHS.Minimum &&
542 (LHS.Flags & WASM_LIMITS_FLAG_HAS_MAX ? LHS.Maximum == RHS.Maximum
543 : true) &&
545 ? LHS.PageSize == RHS.PageSize
546 : true);
547}
548
549inline bool operator==(const WasmTableType &LHS, const WasmTableType &RHS) {
550 return LHS.ElemType == RHS.ElemType && LHS.Limits == RHS.Limits;
551}
552
557
558} // end namespace wasm
559} // end namespace llvm
560
561#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:41
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1197
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:55
@ 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 unsigned WASM_SYMBOL_UNDEFINED
Definition: Wasm.h:247
const unsigned WASM_SYMBOL_NO_STRIP
Definition: Wasm.h:250
@ WASM_DATA_SEGMENT_IS_PASSIVE
Definition: Wasm.h:166
@ WASM_DATA_SEGMENT_HAS_MEMINDEX
Definition: Wasm.h:167
const char WasmMagic[]
Definition: Wasm.h:27
@ WASM_OPCODE_LOCAL_SET
Definition: Wasm.h:98
@ WASM_OPCODE_CALL
Definition: Wasm.h:96
@ WASM_OPCODE_LOCAL_GET
Definition: Wasm.h:97
@ WASM_OPCODE_I64_ADD
Definition: Wasm.h:111
@ WASM_OPCODE_I32_SUB
Definition: Wasm.h:109
@ WASM_OPCODE_F64_CONST
Definition: Wasm.h:107
@ WASM_OPCODE_END
Definition: Wasm.h:95
@ WASM_OPCODE_I64_MUL
Definition: Wasm.h:113
@ WASM_OPCODE_GLOBAL_SET
Definition: Wasm.h:101
@ WASM_OPCODE_REF_NULL
Definition: Wasm.h:114
@ WASM_OPCODE_GC_PREFIX
Definition: Wasm.h:116
@ WASM_OPCODE_REF_FUNC
Definition: Wasm.h:115
@ WASM_OPCODE_F32_CONST
Definition: Wasm.h:106
@ WASM_OPCODE_GLOBAL_GET
Definition: Wasm.h:100
@ WASM_OPCODE_I64_SUB
Definition: Wasm.h:112
@ WASM_OPCODE_I32_MUL
Definition: Wasm.h:110
@ WASM_OPCODE_I32_ADD
Definition: Wasm.h:108
@ WASM_OPCODE_LOCAL_TEE
Definition: Wasm.h:99
@ WASM_OPCODE_I32_STORE
Definition: Wasm.h:102
@ WASM_OPCODE_I64_CONST
Definition: Wasm.h:105
@ WASM_OPCODE_I64_STORE
Definition: Wasm.h:103
@ WASM_OPCODE_I32_CONST
Definition: Wasm.h:104
@ WASM_LIMITS_FLAG_HAS_MAX
Definition: Wasm.h:159
@ WASM_LIMITS_FLAG_IS_SHARED
Definition: Wasm.h:160
@ WASM_LIMITS_FLAG_IS_64
Definition: Wasm.h:161
@ WASM_LIMITS_FLAG_NONE
Definition: Wasm.h:158
@ WASM_LIMITS_FLAG_HAS_PAGE_SIZE
Definition: Wasm.h:162
@ 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_GLOBAL
Definition: Wasm.h:242
WasmTagAttribute
Definition: Wasm.h:235
@ WASM_TAG_ATTRIBUTE_EXCEPTION
Definition: Wasm.h:236
@ WASM_DYLINK_RUNTIME_PATH
Definition: Wasm.h:207
@ WASM_DYLINK_NEEDED
Definition: Wasm.h:204
@ WASM_DYLINK_MEM_INFO
Definition: Wasm.h:203
@ WASM_DYLINK_EXPORT_INFO
Definition: Wasm.h:205
@ WASM_DYLINK_IMPORT_INFO
Definition: Wasm.h:206
const unsigned WASM_SYMBOL_TLS
Definition: Wasm.h:251
const uint32_t WasmMetadataVersion
Definition: Wasm.h:31
const unsigned WASM_SYMBOL_BINDING_WEAK
Definition: Wasm.h:243
const unsigned WASM_SYMBOL_BINDING_LOCAL
Definition: Wasm.h:244
@ WASM_ELEM_SEGMENT_HAS_INIT_EXPRS
Definition: Wasm.h:174
@ WASM_ELEM_SEGMENT_IS_DECLARATIVE
Definition: Wasm.h:172
@ WASM_ELEM_SEGMENT_HAS_TABLE_NUMBER
Definition: Wasm.h:173
@ WASM_ELEM_SEGMENT_IS_PASSIVE
Definition: Wasm.h:171
LLVM_ABI llvm::StringRef toString(WasmSymbolType type)
Definition: Wasm.cpp:11
WasmSymbolType
Definition: Wasm.h:219
@ WASM_SYMBOL_TYPE_GLOBAL
Definition: Wasm.h:222
@ WASM_SYMBOL_TYPE_DATA
Definition: Wasm.h:221
@ WASM_SYMBOL_TYPE_TAG
Definition: Wasm.h:224
@ WASM_SYMBOL_TYPE_TABLE
Definition: Wasm.h:225
@ WASM_SYMBOL_TYPE_SECTION
Definition: Wasm.h:223
@ WASM_SYMBOL_TYPE_FUNCTION
Definition: Wasm.h:220
const uint32_t WasmVersion
Definition: Wasm.h:29
ElemSegmentMode
Definition: Wasm.h:426
@ WASM_EXTERNAL_TABLE
Definition: Wasm.h:87
@ WASM_EXTERNAL_FUNCTION
Definition: Wasm.h:86
@ WASM_EXTERNAL_TAG
Definition: Wasm.h:90
@ WASM_EXTERNAL_MEMORY
Definition: Wasm.h:88
@ WASM_EXTERNAL_GLOBAL
Definition: Wasm.h:89
const unsigned WASM_SYMBOL_EXPORTED
Definition: Wasm.h:248
const unsigned WASM_SYMBOL_BINDING_MASK
Definition: Wasm.h:239
@ WASM_OPCODE_BR
Definition: Wasm.h:134
@ WASM_OPCODE_I32_ATOMIC_STORE
Definition: Wasm.h:145
@ WASM_OPCODE_MEMORY_FILL
Definition: Wasm.h:140
@ WASM_OPCODE_DATA_DROP
Definition: Wasm.h:141
@ WASM_OPCODE_BR_TABLE
Definition: Wasm.h:135
@ WASM_OPCODE_I32_ATOMIC_WAIT
Definition: Wasm.h:144
@ WASM_OPCODE_MISC_PREFIX
Definition: Wasm.h:138
@ WASM_OPCODE_BLOCK
Definition: Wasm.h:133
@ WASM_OPCODE_ATOMIC_NOTIFY
Definition: Wasm.h:143
@ WASM_OPCODE_RETURN
Definition: Wasm.h:136
@ WASM_OPCODE_I32_RMW_CMPXCHG
Definition: Wasm.h:146
@ WASM_OPCODE_MEMORY_INIT
Definition: Wasm.h:139
@ WASM_OPCODE_DROP
Definition: Wasm.h:137
@ WASM_OPCODE_ATOMICS_PREFIX
Definition: Wasm.h:142
LLVM_ABI bool relocTypeHasAddend(uint32_t type)
Definition: Wasm.cpp:66
@ WASM_OPCODE_ARRAY_NEW_FIXED
Definition: Wasm.h:125
@ WASM_OPCODE_REF_I31
Definition: Wasm.h:126
@ WASM_OPCODE_ARRAY_NEW_DEFAULT
Definition: Wasm.h:124
@ WASM_OPCODE_STRUCT_NEW
Definition: Wasm.h:121
@ WASM_OPCODE_STRUCT_NEW_DEFAULT
Definition: Wasm.h:122
@ WASM_OPCODE_ARRAY_NEW
Definition: Wasm.h:123
@ WASM_OPCODE_CATCH_ALL_REF
Definition: Wasm.h:154
@ WASM_OPCODE_CATCH
Definition: Wasm.h:151
@ WASM_OPCODE_CATCH_ALL
Definition: Wasm.h:153
@ WASM_OPCODE_CATCH_REF
Definition: Wasm.h:152
@ WASM_FEATURE_PREFIX_USED
Definition: Wasm.h:180
@ WASM_FEATURE_PREFIX_DISALLOWED
Definition: Wasm.h:181
WasmSegmentFlag
Definition: Wasm.h:228
@ WASM_SEG_FLAG_RETAIN
Definition: Wasm.h:231
@ WASM_SEG_FLAG_TLS
Definition: Wasm.h:230
@ WASM_SEG_FLAG_STRINGS
Definition: Wasm.h:229
WasmRelocType
Definition: Wasm.h:256
bool operator!=(const WasmSignature &LHS, const WasmSignature &RHS)
Definition: Wasm.h:528
LLVM_ABI llvm::StringRef sectionTypeToString(uint32_t type)
Definition: Wasm.cpp:41
@ WASM_COMDAT_SECTION
Definition: Wasm.h:215
@ WASM_COMDAT_FUNCTION
Definition: Wasm.h:213
@ WASM_COMDAT_DATA
Definition: Wasm.h:212
const uint32_t WasmDefaultPageSize
Definition: Wasm.h:34
@ WASM_INIT_FUNCS
Definition: Wasm.h:196
@ WASM_COMDAT_INFO
Definition: Wasm.h:197
@ WASM_SEGMENT_INFO
Definition: Wasm.h:195
@ WASM_SYMBOL_TABLE
Definition: Wasm.h:198
const unsigned WASM_SYMBOL_EXPLICIT_NAME
Definition: Wasm.h:249
const unsigned WASM_SYMBOL_ABSOLUTE
Definition: Wasm.h:252
const unsigned WASM_SYMBOL_VISIBILITY_MASK
Definition: Wasm.h:240
@ WASM_NAMES_LOCAL
Definition: Wasm.h:188
@ WASM_NAMES_DATA_SEGMENT
Definition: Wasm.h:190
@ WASM_NAMES_GLOBAL
Definition: Wasm.h:189
@ WASM_NAMES_FUNCTION
Definition: Wasm.h:187
@ WASM_NAMES_MODULE
Definition: Wasm.h:186
const unsigned WASM_SYMBOL_VISIBILITY_HIDDEN
Definition: Wasm.h:246
const unsigned WASM_ELEM_SEGMENT_MASK_HAS_ELEM_DESC
Definition: Wasm.h:176
LLVM_ABI llvm::StringRef relocTypetoString(uint32_t type)
Definition: Wasm.cpp:29
const unsigned WASM_SYMBOL_VISIBILITY_DEFAULT
Definition: Wasm.h:245
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:417
WasmInitExpr Offset
Definition: Wasm.h:415
uint32_t MemoryAlignment
Definition: Wasm.h:295
std::vector< StringRef > Needed
Definition: Wasm.h:298
std::vector< StringRef > RuntimePath
Definition: Wasm.h:301
std::vector< WasmDylinkExportInfo > ExportInfo
Definition: Wasm.h:300
std::vector< WasmDylinkImportInfo > ImportInfo
Definition: Wasm.h:299
uint32_t TableAlignment
Definition: Wasm.h:297
WasmInitExpr Offset
Definition: Wasm.h:438
std::vector< uint32_t > Functions
Definition: Wasm.h:439
StringRef Name
Definition: Wasm.h:316
uint32_t Index
Definition: Wasm.h:318
uint32_t CodeOffset
Definition: Wasm.h:403
ArrayRef< uint8_t > Body
Definition: Wasm.h:400
std::optional< StringRef > ExportName
Definition: Wasm.h:404
std::vector< WasmLocalDecl > Locals
Definition: Wasm.h:399
StringRef SymbolName
Definition: Wasm.h:405
uint32_t CodeSectionOffset
Definition: Wasm.h:401
StringRef DebugName
Definition: Wasm.h:406
uint32_t Offset
Definition: Wasm.h:369
WasmInitExpr InitExpr
Definition: Wasm.h:367
StringRef SymbolName
Definition: Wasm.h:368
WasmGlobalType Type
Definition: Wasm.h:366
uint32_t Index
Definition: Wasm.h:365
WasmLimits Memory
Definition: Wasm.h:387
StringRef Field
Definition: Wasm.h:381
WasmGlobalType Global
Definition: Wasm.h:385
StringRef Module
Definition: Wasm.h:380
uint32_t SigIndex
Definition: Wasm.h:384
WasmTableType Table
Definition: Wasm.h:386
union llvm::wasm::WasmInitExprMVP::@188 Value
WasmInitExprMVP Inst
Definition: Wasm.h:355
ArrayRef< uint8_t > Body
Definition: Wasm.h:356
uint64_t Minimum
Definition: Wasm.h:323
uint32_t PageSize
Definition: Wasm.h:325
uint64_t Maximum
Definition: Wasm.h:324
std::vector< WasmInitFunc > InitFunctions
Definition: Wasm.h:498
std::vector< StringRef > Comdats
Definition: Wasm.h:499
std::vector< std::pair< std::string, std::string > > SDKs
Definition: Wasm.h:307
std::vector< std::pair< std::string, std::string > > Languages
Definition: Wasm.h:305
std::vector< std::pair< std::string, std::string > > Tools
Definition: Wasm.h:306
WasmRelocType getType() const
Definition: Wasm.h:456
WasmSignature(SmallVector< ValType, 1 > &&InReturns, SmallVector< ValType, 4 > &&InParams)
Definition: Wasm.h:516
enum llvm::wasm::WasmSignature::@193 Kind
SmallVector< ValType, 1 > Returns
Definition: Wasm.h:507
SmallVector< ValType, 4 > Params
Definition: Wasm.h:508
enum llvm::wasm::WasmSignature::@194 State
std::optional< StringRef > ExportName
Definition: Wasm.h:473
WasmDataReference DataRef
Definition: Wasm.h:479
std::optional< StringRef > ImportModule
Definition: Wasm.h:469
std::optional< StringRef > ImportName
Definition: Wasm.h:471
WasmLimits Limits
Definition: Wasm.h:330
WasmTableType Type
Definition: Wasm.h:335
StringRef SymbolName
Definition: Wasm.h:336
uint32_t Index
Definition: Wasm.h:334
uint32_t Index
Definition: Wasm.h:374
uint32_t SigIndex
Definition: Wasm.h:375
StringRef SymbolName
Definition: Wasm.h:376