LLVM 24.0.0git
WasmYAML.cpp
Go to the documentation of this file.
1//===- WasmYAML.cpp - Wasm YAMLIO implementation --------------------------===//
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 classes for handling the YAML representation of wasm.
10//
11//===----------------------------------------------------------------------===//
12
14#include "llvm/ADT/StringRef.h"
19
20namespace llvm {
21
22namespace WasmYAML {
23
24// Declared here rather than in the header to comply with:
25// http://llvm.org/docs/CodingStandards.html#provide-a-virtual-method-anchor-for-classes-in-headers
26Section::~Section() = default;
27
28} // end namespace WasmYAML
29
30namespace yaml {
31
36
38 WasmYAML::Object &Object) {
39 IO.setContext(&Object);
40 IO.mapTag("!WASM", true);
41 IO.mapRequired("FileHeader", Object.Header);
42 IO.mapOptional("Sections", Object.Sections);
43 IO.setContext(nullptr);
44}
45
47 IO.mapRequired("Type", Section.Type);
48 IO.mapOptional("Relocations", Section.Relocations);
49 IO.mapOptional("HeaderSecSizeEncodingLen", Section.HeaderSecSizeEncodingLen);
50}
51
53 commonSectionMapping(IO, Section);
54 IO.mapRequired("Name", Section.Name);
55 IO.mapOptional("TargetArch", Section.TargetArch, StringRef());
56 IO.mapRequired("MemorySize", Section.MemorySize);
57 IO.mapRequired("MemoryAlignment", Section.MemoryAlignment);
58 IO.mapRequired("TableSize", Section.TableSize);
59 IO.mapRequired("TableAlignment", Section.TableAlignment);
60 IO.mapRequired("Needed", Section.Needed);
61 IO.mapOptional("ImportInfo", Section.ImportInfo);
62 IO.mapOptional("ExportInfo", Section.ExportInfo);
63 IO.mapOptional("RuntimePath", Section.RuntimePath);
64}
65
66static void sectionMapping(IO &IO, WasmYAML::NameSection &Section) {
67 commonSectionMapping(IO, Section);
68 IO.mapRequired("Name", Section.Name);
69 IO.mapOptional("FunctionNames", Section.FunctionNames);
70 IO.mapOptional("GlobalNames", Section.GlobalNames);
71 IO.mapOptional("DataSegmentNames", Section.DataSegmentNames);
72}
73
75 commonSectionMapping(IO, Section);
76 IO.mapRequired("Name", Section.Name);
77 IO.mapRequired("Version", Section.Version);
78 IO.mapOptional("TargetArch", Section.TargetArch, StringRef());
79 IO.mapOptional("SymbolTable", Section.SymbolTable);
80 IO.mapOptional("SegmentInfo", Section.SegmentInfos);
81 IO.mapOptional("InitFunctions", Section.InitFunctions);
82 IO.mapOptional("Comdats", Section.Comdats);
83}
84
86 commonSectionMapping(IO, Section);
87 IO.mapRequired("Name", Section.Name);
88 IO.mapOptional("Languages", Section.Languages);
89 IO.mapOptional("Tools", Section.Tools);
90 IO.mapOptional("SDKs", Section.SDKs);
91}
92
94 commonSectionMapping(IO, Section);
95 IO.mapRequired("Name", Section.Name);
96 IO.mapRequired("Features", Section.Features);
97}
98
100 commonSectionMapping(IO, Section);
101 IO.mapRequired("Name", Section.Name);
102 IO.mapRequired("Payload", Section.Payload);
103}
104
105static void sectionMapping(IO &IO, WasmYAML::TypeSection &Section) {
106 commonSectionMapping(IO, Section);
107 IO.mapOptional("Signatures", Section.Signatures);
108}
109
111 commonSectionMapping(IO, Section);
112 IO.mapOptional("Imports", Section.Imports);
113}
114
116 commonSectionMapping(IO, Section);
117 IO.mapOptional("FunctionTypes", Section.FunctionTypes);
118}
119
121 commonSectionMapping(IO, Section);
122 IO.mapOptional("Tables", Section.Tables);
123}
124
126 commonSectionMapping(IO, Section);
127 IO.mapOptional("Memories", Section.Memories);
128}
129
130static void sectionMapping(IO &IO, WasmYAML::TagSection &Section) {
131 commonSectionMapping(IO, Section);
132 IO.mapOptional("TagTypes", Section.TagTypes);
133}
134
136 commonSectionMapping(IO, Section);
137 IO.mapOptional("Globals", Section.Globals);
138}
139
141 commonSectionMapping(IO, Section);
142 IO.mapOptional("Exports", Section.Exports);
143}
144
146 commonSectionMapping(IO, Section);
147 IO.mapOptional("StartFunction", Section.StartFunction);
148}
149
150static void sectionMapping(IO &IO, WasmYAML::ElemSection &Section) {
151 commonSectionMapping(IO, Section);
152 IO.mapOptional("Segments", Section.Segments);
153}
154
155static void sectionMapping(IO &IO, WasmYAML::CodeSection &Section) {
156 commonSectionMapping(IO, Section);
157 IO.mapRequired("Functions", Section.Functions);
158}
159
160static void sectionMapping(IO &IO, WasmYAML::DataSection &Section) {
161 commonSectionMapping(IO, Section);
162 IO.mapRequired("Segments", Section.Segments);
163}
164
166 commonSectionMapping(IO, Section);
167 IO.mapRequired("Count", Section.Count);
168}
169
171 IO &IO, std::unique_ptr<WasmYAML::Section> &Section) {
172 WasmYAML::SectionType SectionType;
173 if (IO.outputting())
174 SectionType = Section->Type;
175 else
176 IO.mapRequired("Type", SectionType);
177
178 switch (SectionType) {
181 if (IO.outputting()) {
182 auto CustomSection = cast<WasmYAML::CustomSection>(Section.get());
183 SectionName = CustomSection->Name;
184 } else {
185 IO.mapRequired("Name", SectionName);
186 }
187 if (SectionName == "dylink" || SectionName == "dylink.0") {
188 if (!IO.outputting())
189 Section.reset(new WasmYAML::DylinkSection());
191 } else if (SectionName == "linking") {
192 if (!IO.outputting())
193 Section.reset(new WasmYAML::LinkingSection());
195 } else if (SectionName == "name") {
196 if (!IO.outputting())
197 Section.reset(new WasmYAML::NameSection());
199 } else if (SectionName == "producers") {
200 if (!IO.outputting())
201 Section.reset(new WasmYAML::ProducersSection());
203 } else if (SectionName == "target_features") {
204 if (!IO.outputting())
205 Section.reset(new WasmYAML::TargetFeaturesSection());
207 } else {
208 if (!IO.outputting())
209 Section.reset(new WasmYAML::CustomSection(SectionName));
211 }
212 break;
213 }
215 if (!IO.outputting())
216 Section.reset(new WasmYAML::TypeSection());
218 break;
220 if (!IO.outputting())
221 Section.reset(new WasmYAML::ImportSection());
223 break;
225 if (!IO.outputting())
226 Section.reset(new WasmYAML::FunctionSection());
228 break;
230 if (!IO.outputting())
231 Section.reset(new WasmYAML::TableSection());
233 break;
235 if (!IO.outputting())
236 Section.reset(new WasmYAML::MemorySection());
238 break;
240 if (!IO.outputting())
241 Section.reset(new WasmYAML::TagSection());
243 break;
245 if (!IO.outputting())
246 Section.reset(new WasmYAML::GlobalSection());
248 break;
250 if (!IO.outputting())
251 Section.reset(new WasmYAML::ExportSection());
253 break;
255 if (!IO.outputting())
256 Section.reset(new WasmYAML::StartSection());
258 break;
260 if (!IO.outputting())
261 Section.reset(new WasmYAML::ElemSection());
263 break;
265 if (!IO.outputting())
266 Section.reset(new WasmYAML::CodeSection());
268 break;
270 if (!IO.outputting())
271 Section.reset(new WasmYAML::DataSection());
273 break;
275 if (!IO.outputting())
276 Section.reset(new WasmYAML::DataCountSection());
278 break;
279 default:
280 llvm_unreachable("Unknown section type");
281 }
282}
283
285 IO &IO, WasmYAML::SectionType &Type) {
286#define ECase(X) IO.enumCase(Type, #X, wasm::WASM_SEC_##X);
287 ECase(CUSTOM);
288 ECase(TYPE);
289 ECase(IMPORT);
291 ECase(TABLE);
292 ECase(MEMORY);
293 ECase(GLOBAL);
294 ECase(TAG);
295 ECase(EXPORT);
296 ECase(START);
297 ECase(ELEM);
298 ECase(CODE);
299 ECase(DATA);
300 ECase(DATACOUNT);
301#undef ECase
302}
303
305 IO &IO, WasmYAML::Signature &Signature) {
306 IO.mapRequired("Index", Signature.Index);
307 IO.mapRequired("ParamTypes", Signature.ParamTypes);
308 IO.mapRequired("ReturnTypes", Signature.ReturnTypes);
309}
310
312 IO.mapRequired("Index", Table.Index);
313 IO.mapRequired("ElemType", Table.ElemType);
314 IO.mapRequired("Limits", Table.TableLimits);
315}
316
319 IO.mapRequired("Index", Function.Index);
320 IO.mapRequired("Locals", Function.Locals);
321 IO.mapRequired("Body", Function.Body);
322}
323
325 IO &IO, WasmYAML::Relocation &Relocation) {
326 IO.mapRequired("Type", Relocation.Type);
327 IO.mapRequired("Index", Relocation.Index);
328 IO.mapRequired("Offset", Relocation.Offset);
329 IO.mapOptional("Addend", Relocation.Addend, 0);
330}
331
333 IO &IO, WasmYAML::NameEntry &NameEntry) {
334 IO.mapRequired("Index", NameEntry.Index);
335 IO.mapRequired("Name", NameEntry.Name);
336}
337
339 IO &IO, WasmYAML::ProducerEntry &ProducerEntry) {
340 IO.mapRequired("Name", ProducerEntry.Name);
341 IO.mapRequired("Version", ProducerEntry.Version);
342}
343
345 IO &IO, WasmYAML::FeaturePolicyPrefix &Kind) {
346#define ECase(X) IO.enumCase(Kind, #X, wasm::WASM_FEATURE_PREFIX_##X);
347 ECase(USED);
348 ECase(DISALLOWED);
349#undef ECase
350}
351
353 IO &IO, WasmYAML::FeatureEntry &FeatureEntry) {
354 IO.mapRequired("Prefix", FeatureEntry.Prefix);
355 IO.mapRequired("Name", FeatureEntry.Name);
356}
357
359 IO &IO, WasmYAML::SegmentInfo &SegmentInfo) {
360 IO.mapRequired("Index", SegmentInfo.Index);
361 IO.mapRequired("Name", SegmentInfo.Name);
362 IO.mapRequired("Alignment", SegmentInfo.Alignment);
363 IO.mapRequired("Flags", SegmentInfo.Flags);
364}
365
367 IO &IO, WasmYAML::LocalDecl &LocalDecl) {
368 IO.mapRequired("Type", LocalDecl.Type);
369 IO.mapRequired("Count", LocalDecl.Count);
370}
371
373 WasmYAML::Limits &Limits) {
374 IO.mapOptional("Flags", Limits.Flags, 0);
375 IO.mapRequired("Minimum", Limits.Minimum);
377 IO.mapOptional("Maximum", Limits.Maximum);
379 IO.mapOptional("PageSize", Limits.PageSize);
380}
381
383 IO &IO, WasmYAML::ElemSegment &Segment) {
384 IO.mapOptional("Flags", Segment.Flags, 0);
385 if (!IO.outputting() ||
387 IO.mapOptional("TableNumber", Segment.TableNumber);
388 if (!IO.outputting() ||
390 IO.mapOptional("ElemKind", Segment.ElemKind);
391 // TODO: Omit "offset" for passive segments? It's neither meaningful nor
392 // encoded.
393 IO.mapRequired("Offset", Segment.Offset);
394 IO.mapRequired("Functions", Segment.Functions);
395}
396
399 IO.mapRequired("Module", Import.Module);
400 IO.mapRequired("Field", Import.Field);
401 IO.mapRequired("Kind", Import.Kind);
404 IO.mapRequired("SigIndex", Import.SigIndex);
405 } else if (Import.Kind == wasm::WASM_EXTERNAL_GLOBAL) {
406 IO.mapRequired("GlobalType", Import.GlobalImport.Type);
407 IO.mapRequired("GlobalMutable", Import.GlobalImport.Mutable);
408 } else if (Import.Kind == wasm::WASM_EXTERNAL_TABLE) {
409 IO.mapRequired("Table", Import.TableImport);
410 } else if (Import.Kind == wasm::WASM_EXTERNAL_MEMORY) {
411 IO.mapRequired("Memory", Import.Memory);
412 } else {
413 llvm_unreachable("unhandled import type");
414 }
415}
416
419 IO.mapRequired("Name", Export.Name);
420 IO.mapRequired("Kind", Export.Kind);
421 IO.mapRequired("Index", Export.Index);
422}
423
426 IO.mapRequired("Index", Global.Index);
427 IO.mapRequired("Type", Global.Type);
428 IO.mapRequired("Mutable", Global.Mutable);
429 IO.mapRequired("InitExpr", Global.Init);
430}
431
433 WasmYAML::InitExpr &Expr) {
434 IO.mapOptional("Extended", Expr.Extended, false);
435 if (Expr.Extended) {
436 IO.mapRequired("Body", Expr.Body);
437 } else {
438 WasmYAML::Opcode Op = Expr.Inst.Opcode;
439 IO.mapRequired("Opcode", Op);
440 Expr.Inst.Opcode = Op;
441 switch (Expr.Inst.Opcode) {
443 IO.mapRequired("Value", Expr.Inst.Value.Int32);
444 break;
446 IO.mapRequired("Value", Expr.Inst.Value.Int64);
447 break;
449 IO.mapRequired("Value", Expr.Inst.Value.Float32);
450 break;
452 IO.mapRequired("Value", Expr.Inst.Value.Float64);
453 break;
455 IO.mapRequired("Index", Expr.Inst.Value.Global);
456 break;
458 WasmYAML::ValueType Ty = wasm::WASM_TYPE_EXTERNREF;
459 IO.mapRequired("Type", Ty);
460 break;
461 }
462 }
463 }
464}
465
467 IO &IO, WasmYAML::DataSegment &Segment) {
468 IO.mapOptional("SectionOffset", Segment.SectionOffset);
469 IO.mapRequired("InitFlags", Segment.InitFlags);
471 IO.mapRequired("MemoryIndex", Segment.MemoryIndex);
472 } else {
473 Segment.MemoryIndex = 0;
474 }
475 if ((Segment.InitFlags & wasm::WASM_DATA_SEGMENT_IS_PASSIVE) == 0) {
476 IO.mapRequired("Offset", Segment.Offset);
477 } else {
479 Segment.Offset.Inst.Value.Int32 = 0;
480 }
481 IO.mapRequired("Content", Segment.Content);
482}
483
486 IO.mapRequired("Priority", Init.Priority);
487 IO.mapRequired("Symbol", Init.Symbol);
488}
489
491 IO &IO, WasmYAML::ComdatKind &Kind) {
492#define ECase(X) IO.enumCase(Kind, #X, wasm::WASM_COMDAT_##X);
494 ECase(DATA);
495 ECase(SECTION);
496#undef ECase
497}
498
500 IO &IO, WasmYAML::ComdatEntry &ComdatEntry) {
501 IO.mapRequired("Kind", ComdatEntry.Kind);
502 IO.mapRequired("Index", ComdatEntry.Index);
503}
504
507 IO.mapRequired("Name", Comdat.Name);
508 IO.mapRequired("Entries", Comdat.Entries);
509}
510
512 WasmYAML::SymbolInfo &Info) {
513 IO.mapRequired("Index", Info.Index);
514 IO.mapRequired("Kind", Info.Kind);
515 if (Info.Kind != wasm::WASM_SYMBOL_TYPE_SECTION)
516 IO.mapRequired("Name", Info.Name);
517 IO.mapRequired("Flags", Info.Flags);
518 if (Info.Kind == wasm::WASM_SYMBOL_TYPE_FUNCTION) {
519 IO.mapRequired("Function", Info.ElementIndex);
520 } else if (Info.Kind == wasm::WASM_SYMBOL_TYPE_GLOBAL) {
521 IO.mapRequired("Global", Info.ElementIndex);
522 } else if (Info.Kind == wasm::WASM_SYMBOL_TYPE_TABLE) {
523 IO.mapRequired("Table", Info.ElementIndex);
524 } else if (Info.Kind == wasm::WASM_SYMBOL_TYPE_TAG) {
525 IO.mapRequired("Tag", Info.ElementIndex);
526 } else if (Info.Kind == wasm::WASM_SYMBOL_TYPE_DATA) {
527 if ((Info.Flags & wasm::WASM_SYMBOL_UNDEFINED) == 0) {
528 if ((Info.Flags & wasm::WASM_SYMBOL_BINDING_MASK) ==
530 IO.mapRequired("Size", Info.CommonRef.Size);
531 IO.mapRequired("Align", Info.CommonRef.Alignment);
532 } else {
533 if ((Info.Flags & wasm::WASM_SYMBOL_ABSOLUTE) == 0) {
534 IO.mapRequired("Segment", Info.DataRef.Segment);
535 }
536 IO.mapOptional("Offset", Info.DataRef.Offset, 0u);
537 IO.mapRequired("Size", Info.DataRef.Size);
538 }
539 }
540 } else if (Info.Kind == wasm::WASM_SYMBOL_TYPE_SECTION) {
541 IO.mapRequired("Section", Info.ElementIndex);
542 } else {
543 llvm_unreachable("unsupported symbol kind");
544 }
545}
546
549 IO.mapRequired("Module", Info.Module);
550 IO.mapRequired("Field", Info.Field);
551 IO.mapRequired("Flags", Info.Flags);
552}
553
556 IO.mapRequired("Name", Info.Name);
557 IO.mapRequired("Flags", Info.Flags);
558}
559
561 IO &IO, WasmYAML::LimitFlags &Value) {
562#define BCase(X) IO.bitSetCase(Value, #X, wasm::WASM_LIMITS_FLAG_##X)
563 BCase(HAS_MAX);
564 BCase(IS_SHARED);
565 BCase(IS_64);
566 BCase(HAS_PAGE_SIZE);
567#undef BCase
568}
569
571 IO &IO, WasmYAML::SegmentFlags &Value) {
572#define BCase(X) IO.bitSetCase(Value, #X, wasm::WASM_SEG_FLAG_##X)
573 BCase(STRINGS);
574 BCase(TLS);
575 BCase(RETAIN);
576#undef BCase
577}
578
580 IO &IO, WasmYAML::SymbolFlags &Value) {
581#define BCaseMask(M, X) \
582 IO.maskedBitSetCase(Value, #X, wasm::WASM_SYMBOL_##X, wasm::WASM_SYMBOL_##M)
583 // BCaseMask(BINDING_MASK, BINDING_GLOBAL);
584 BCaseMask(BINDING_MASK, BINDING_WEAK);
585 BCaseMask(BINDING_MASK, BINDING_LOCAL);
586 BCaseMask(BINDING_MASK, BINDING_COMMON);
587 // BCaseMask(VISIBILITY_MASK, VISIBILITY_DEFAULT);
588 BCaseMask(VISIBILITY_MASK, VISIBILITY_HIDDEN);
590 BCaseMask(EXPORTED, EXPORTED);
591 BCaseMask(EXPLICIT_NAME, EXPLICIT_NAME);
592 BCaseMask(NO_STRIP, NO_STRIP);
593 BCaseMask(TLS, TLS);
594 BCaseMask(ABSOLUTE, ABSOLUTE);
595#undef BCaseMask
596}
597
599 IO &IO, WasmYAML::SymbolKind &Kind) {
600#define ECase(X) IO.enumCase(Kind, #X, wasm::WASM_SYMBOL_TYPE_##X);
602 ECase(DATA);
603 ECase(GLOBAL);
604 ECase(TABLE);
605 ECase(SECTION);
606 ECase(TAG);
607#undef ECase
608}
609
611 IO &IO, WasmYAML::ValueType &Type) {
612#define CONCAT(X) (uint32_t) wasm::ValType::X
613#define ECase(X) IO.enumCase(Type, #X, CONCAT(X));
614 ECase(I32);
615 ECase(I64);
616 ECase(F32);
617 ECase(F64);
618 ECase(V128);
619 ECase(FUNCREF);
620 ECase(EXTERNREF);
621 ECase(EXNREF);
622 ECase(OTHERREF);
623#undef ECase
624}
625
627 IO &IO, WasmYAML::ExportKind &Kind) {
628#define ECase(X) IO.enumCase(Kind, #X, wasm::WASM_EXTERNAL_##X);
630 ECase(TABLE);
631 ECase(MEMORY);
632 ECase(GLOBAL);
633 ECase(TAG);
634#undef ECase
635}
636
638 IO &IO, WasmYAML::Opcode &Code) {
639#define ECase(X) IO.enumCase(Code, #X, wasm::WASM_OPCODE_##X);
640 ECase(END);
641 ECase(I32_CONST);
642 ECase(I64_CONST);
643 ECase(F64_CONST);
644 ECase(F32_CONST);
645 ECase(GLOBAL_GET);
646 ECase(REF_NULL);
647#undef ECase
648}
649
651 IO &IO, WasmYAML::TableType &Type) {
652#define CONCAT(X) (uint32_t) wasm::ValType::X
653#define ECase(X) IO.enumCase(Type, #X, CONCAT(X));
654 ECase(FUNCREF);
655 ECase(EXTERNREF);
656 ECase(EXNREF);
657 ECase(OTHERREF);
658#undef ECase
659}
660
662 IO &IO, WasmYAML::RelocType &Type) {
663#define WASM_RELOC(name, value) IO.enumCase(Type, #name, wasm::name);
664#include "llvm/BinaryFormat/WasmRelocs.def"
665#undef WASM_RELOC
666 IO.enumFallback<Hex32>(Type);
667}
668
669} // end namespace yaml
670
671} // end namespace llvm
constexpr LLT F64
constexpr LLT F32
#define BCase(X)
Definition COFFYAML.cpp:267
#define BCaseMask(X, M)
#define FUNCTION(NAME, NARG, ROUND_MODE, INTRINSIC)
static constexpr auto TAG
This file declares classes for handling the YAML representation of wasm binaries.
#define ECase(X)
@ UNDEFINED
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
The instances of the Type class are immutable: once they are created, they are never changed.
Definition Type.h:46
LLVM Value Representation.
Definition Value.h:75
void setContext(void *)
virtual bool outputting() const =0
virtual bool mapTag(StringRef Tag, bool Default=false)=0
void mapOptional(StringRef Key, T &Val)
Definition YAMLTraits.h:800
void enumFallback(T &Val)
Definition YAMLTraits.h:749
void mapRequired(StringRef Key, T &Val)
Definition YAMLTraits.h:790
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
constexpr uint16_t VISIBILITY_MASK
Definition XCOFF.h:260
const unsigned WASM_SYMBOL_UNDEFINED
Definition Wasm.h:259
@ WASM_TYPE_EXTERNREF
Definition Wasm.h:66
@ 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_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
@ WASM_LIMITS_FLAG_HAS_MAX
Definition Wasm.h:168
@ WASM_LIMITS_FLAG_HAS_PAGE_SIZE
Definition Wasm.h:171
@ WASM_SYMBOL_TYPE_GLOBAL
Definition Wasm.h:233
@ WASM_SYMBOL_TYPE_DATA
Definition Wasm.h:232
@ WASM_SYMBOL_TYPE_TAG
Definition Wasm.h:235
@ WASM_SYMBOL_TYPE_TABLE
Definition Wasm.h:236
@ WASM_SYMBOL_TYPE_SECTION
Definition Wasm.h:234
@ WASM_SYMBOL_TYPE_FUNCTION
Definition Wasm.h:231
const unsigned WASM_SYMBOL_BINDING_COMMON
Definition Wasm.h:256
const unsigned WASM_SYMBOL_BINDING_MASK
Definition Wasm.h:250
@ WASM_ELEM_SEGMENT_HAS_TABLE_NUMBER
Definition Wasm.h:182
@ WASM_DATA_SEGMENT_IS_PASSIVE
Definition Wasm.h:175
@ WASM_DATA_SEGMENT_HAS_MEMINDEX
Definition Wasm.h:176
@ 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_OPCODE_F64_CONST
Definition Wasm.h:116
@ WASM_OPCODE_REF_NULL
Definition Wasm.h:123
@ WASM_OPCODE_F32_CONST
Definition Wasm.h:115
@ WASM_OPCODE_GLOBAL_GET
Definition Wasm.h:109
@ WASM_OPCODE_I64_CONST
Definition Wasm.h:114
@ WASM_OPCODE_I32_CONST
Definition Wasm.h:113
const unsigned WASM_SYMBOL_ABSOLUTE
Definition Wasm.h:264
const unsigned WASM_ELEM_SEGMENT_MASK_HAS_ELEM_DESC
Definition Wasm.h:185
static void sectionMapping(IO &IO, ELFYAML::DynamicSection &Section)
Definition ELFYAML.cpp:1378
static void commonSectionMapping(IO &IO, ELFYAML::Section &Section)
Definition ELFYAML.cpp:1351
This is an optimization pass for GlobalISel generic memory operations.
@ Export
Export information to summary.
Definition IPO.h:40
@ Import
Import information from summary.
Definition IPO.h:39
@ Global
Append to llvm.global_dtors.
DWARFExpression::Operation Op
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
Definition Casting.h:559
yaml::BinaryRef Content
Definition WasmYAML.h:129
std::vector< uint32_t > Functions
Definition WasmYAML.h:80
FeaturePolicyPrefix Prefix
Definition WasmYAML.h:143
wasm::WasmInitExprMVP Inst
Definition WasmYAML.h:70
yaml::BinaryRef Body
Definition WasmYAML.h:71
yaml::Hex32 Minimum
Definition WasmYAML.h:49
yaml::Hex32 PageSize
Definition WasmYAML.h:51
yaml::Hex32 Maximum
Definition WasmYAML.h:50
std::vector< ValueType > ReturnTypes
Definition WasmYAML.h:158
std::vector< ValueType > ParamTypes
Definition WasmYAML.h:157
union llvm::wasm::WasmInitExprMVP::@234311111124136373374304035273310237314141125040 Value
static LLVM_ABI void mapping(IO &IO, std::unique_ptr< WasmYAML::Section > &Section)
Definition WasmYAML.cpp:170
This class should be specialized by any type that needs to be converted to/from a YAML mapping.
Definition YAMLTraits.h:63
This class should be specialized by any integer type that is a union of bit values and the YAML repre...
Definition YAMLTraits.h:124
This class should be specialized by any integral type that converts to/from a YAML scalar where there...
Definition YAMLTraits.h:108