LLVM  9.0.0svn
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"
15 #include "llvm/Support/Casting.h"
18 
19 namespace llvm {
20 
21 namespace WasmYAML {
22 
23 // Declared here rather than in the header to comply with:
24 // http://llvm.org/docs/CodingStandards.html#provide-a-virtual-method-anchor-for-classes-in-headers
25 Section::~Section() = default;
26 
27 } // end namespace WasmYAML
28 
29 namespace yaml {
30 
32  IO &IO, WasmYAML::FileHeader &FileHdr) {
33  IO.mapRequired("Version", FileHdr.Version);
34 }
35 
37  WasmYAML::Object &Object) {
38  IO.setContext(&Object);
39  IO.mapTag("!WASM", true);
40  IO.mapRequired("FileHeader", Object.Header);
41  IO.mapOptional("Sections", Object.Sections);
42  IO.setContext(nullptr);
43 }
44 
46  IO.mapRequired("Type", Section.Type);
47  IO.mapOptional("Relocations", Section.Relocations);
48 }
49 
51  commonSectionMapping(IO, Section);
52  IO.mapRequired("Name", Section.Name);
53  IO.mapRequired("MemorySize", Section.MemorySize);
54  IO.mapRequired("MemoryAlignment", Section.MemoryAlignment);
55  IO.mapRequired("TableSize", Section.TableSize);
56  IO.mapRequired("TableAlignment", Section.TableAlignment);
57  IO.mapRequired("Needed", Section.Needed);
58 }
59 
61  commonSectionMapping(IO, Section);
62  IO.mapRequired("Name", Section.Name);
63  IO.mapOptional("FunctionNames", Section.FunctionNames);
64 }
65 
67  commonSectionMapping(IO, Section);
68  IO.mapRequired("Name", Section.Name);
69  IO.mapRequired("Version", Section.Version);
70  IO.mapOptional("SymbolTable", Section.SymbolTable);
71  IO.mapOptional("SegmentInfo", Section.SegmentInfos);
72  IO.mapOptional("InitFunctions", Section.InitFunctions);
73  IO.mapOptional("Comdats", Section.Comdats);
74 }
75 
77  commonSectionMapping(IO, Section);
78  IO.mapRequired("Name", Section.Name);
79  IO.mapOptional("Languages", Section.Languages);
80  IO.mapOptional("Tools", Section.Tools);
81  IO.mapOptional("SDKs", Section.SDKs);
82 }
83 
85  commonSectionMapping(IO, Section);
86  IO.mapRequired("Name", Section.Name);
87  IO.mapRequired("Payload", Section.Payload);
88 }
89 
91  commonSectionMapping(IO, Section);
92  IO.mapOptional("Signatures", Section.Signatures);
93 }
94 
96  commonSectionMapping(IO, Section);
97  IO.mapOptional("Imports", Section.Imports);
98 }
99 
101  commonSectionMapping(IO, Section);
102  IO.mapOptional("FunctionTypes", Section.FunctionTypes);
103 }
104 
106  commonSectionMapping(IO, Section);
107  IO.mapOptional("Tables", Section.Tables);
108 }
109 
111  commonSectionMapping(IO, Section);
112  IO.mapOptional("Memories", Section.Memories);
113 }
114 
116  commonSectionMapping(IO, Section);
117  IO.mapOptional("Globals", Section.Globals);
118 }
119 
121  commonSectionMapping(IO, Section);
122  IO.mapOptional("Events", Section.Events);
123 }
124 
126  commonSectionMapping(IO, Section);
127  IO.mapOptional("Exports", Section.Exports);
128 }
129 
131  commonSectionMapping(IO, Section);
132  IO.mapOptional("StartFunction", Section.StartFunction);
133 }
134 
136  commonSectionMapping(IO, Section);
137  IO.mapOptional("Segments", Section.Segments);
138 }
139 
141  commonSectionMapping(IO, Section);
142  IO.mapRequired("Functions", Section.Functions);
143 }
144 
146  commonSectionMapping(IO, Section);
147  IO.mapRequired("Segments", Section.Segments);
148 }
149 
151  IO &IO, std::unique_ptr<WasmYAML::Section> &Section) {
153  if (IO.outputting())
154  SectionType = Section->Type;
155  else
156  IO.mapRequired("Type", SectionType);
157 
158  switch (SectionType) {
159  case wasm::WASM_SEC_CUSTOM: {
161  if (IO.outputting()) {
162  auto CustomSection = cast<WasmYAML::CustomSection>(Section.get());
163  SectionName = CustomSection->Name;
164  } else {
165  IO.mapRequired("Name", SectionName);
166  }
167  if (SectionName == "dylink") {
168  if (!IO.outputting())
169  Section.reset(new WasmYAML::DylinkSection());
170  sectionMapping(IO, *cast<WasmYAML::DylinkSection>(Section.get()));
171  } else if (SectionName == "linking") {
172  if (!IO.outputting())
173  Section.reset(new WasmYAML::LinkingSection());
174  sectionMapping(IO, *cast<WasmYAML::LinkingSection>(Section.get()));
175  } else if (SectionName == "name") {
176  if (!IO.outputting())
177  Section.reset(new WasmYAML::NameSection());
178  sectionMapping(IO, *cast<WasmYAML::NameSection>(Section.get()));
179  } else if (SectionName == "producers") {
180  if (!IO.outputting())
181  Section.reset(new WasmYAML::ProducersSection());
182  sectionMapping(IO, *cast<WasmYAML::ProducersSection>(Section.get()));
183  } else {
184  if (!IO.outputting())
185  Section.reset(new WasmYAML::CustomSection(SectionName));
186  sectionMapping(IO, *cast<WasmYAML::CustomSection>(Section.get()));
187  }
188  break;
189  }
190  case wasm::WASM_SEC_TYPE:
191  if (!IO.outputting())
192  Section.reset(new WasmYAML::TypeSection());
193  sectionMapping(IO, *cast<WasmYAML::TypeSection>(Section.get()));
194  break;
196  if (!IO.outputting())
197  Section.reset(new WasmYAML::ImportSection());
198  sectionMapping(IO, *cast<WasmYAML::ImportSection>(Section.get()));
199  break;
201  if (!IO.outputting())
202  Section.reset(new WasmYAML::FunctionSection());
203  sectionMapping(IO, *cast<WasmYAML::FunctionSection>(Section.get()));
204  break;
206  if (!IO.outputting())
207  Section.reset(new WasmYAML::TableSection());
208  sectionMapping(IO, *cast<WasmYAML::TableSection>(Section.get()));
209  break;
211  if (!IO.outputting())
212  Section.reset(new WasmYAML::MemorySection());
213  sectionMapping(IO, *cast<WasmYAML::MemorySection>(Section.get()));
214  break;
216  if (!IO.outputting())
217  Section.reset(new WasmYAML::GlobalSection());
218  sectionMapping(IO, *cast<WasmYAML::GlobalSection>(Section.get()));
219  break;
221  if (!IO.outputting())
222  Section.reset(new WasmYAML::EventSection());
223  sectionMapping(IO, *cast<WasmYAML::EventSection>(Section.get()));
224  break;
226  if (!IO.outputting())
227  Section.reset(new WasmYAML::ExportSection());
228  sectionMapping(IO, *cast<WasmYAML::ExportSection>(Section.get()));
229  break;
231  if (!IO.outputting())
232  Section.reset(new WasmYAML::StartSection());
233  sectionMapping(IO, *cast<WasmYAML::StartSection>(Section.get()));
234  break;
235  case wasm::WASM_SEC_ELEM:
236  if (!IO.outputting())
237  Section.reset(new WasmYAML::ElemSection());
238  sectionMapping(IO, *cast<WasmYAML::ElemSection>(Section.get()));
239  break;
240  case wasm::WASM_SEC_CODE:
241  if (!IO.outputting())
242  Section.reset(new WasmYAML::CodeSection());
243  sectionMapping(IO, *cast<WasmYAML::CodeSection>(Section.get()));
244  break;
245  case wasm::WASM_SEC_DATA:
246  if (!IO.outputting())
247  Section.reset(new WasmYAML::DataSection());
248  sectionMapping(IO, *cast<WasmYAML::DataSection>(Section.get()));
249  break;
250  default:
251  llvm_unreachable("Unknown section type");
252  }
253 }
254 
255 void ScalarEnumerationTraits<WasmYAML::SectionType>::enumeration(
256  IO &IO, WasmYAML::SectionType &Type) {
257 #define ECase(X) IO.enumCase(Type, #X, wasm::WASM_SEC_##X);
258  ECase(CUSTOM);
259  ECase(TYPE);
260  ECase(IMPORT);
261  ECase(FUNCTION);
262  ECase(TABLE);
263  ECase(MEMORY);
264  ECase(GLOBAL);
265  ECase(EVENT);
266  ECase(EXPORT);
267  ECase(START);
268  ECase(ELEM);
269  ECase(CODE);
270  ECase(DATA);
271 #undef ECase
272 }
273 
275  IO &IO, WasmYAML::Signature &Signature) {
276  IO.mapRequired("Index", Signature.Index);
277  IO.mapRequired("ReturnType", Signature.ReturnType);
278  IO.mapRequired("ParamTypes", Signature.ParamTypes);
279 }
280 
282  IO.mapRequired("ElemType", Table.ElemType);
283  IO.mapRequired("Limits", Table.TableLimits);
284 }
285 
288  IO.mapRequired("Index", Function.Index);
289  IO.mapRequired("Locals", Function.Locals);
290  IO.mapRequired("Body", Function.Body);
291 }
292 
294  IO &IO, WasmYAML::Relocation &Relocation) {
295  IO.mapRequired("Type", Relocation.Type);
296  IO.mapRequired("Index", Relocation.Index);
297  IO.mapRequired("Offset", Relocation.Offset);
298  IO.mapOptional("Addend", Relocation.Addend, 0);
299 }
300 
302  IO &IO, WasmYAML::NameEntry &NameEntry) {
303  IO.mapRequired("Index", NameEntry.Index);
304  IO.mapRequired("Name", NameEntry.Name);
305 }
306 
308  IO &IO, WasmYAML::ProducerEntry &ProducerEntry) {
309  IO.mapRequired("Name", ProducerEntry.Name);
310  IO.mapRequired("Version", ProducerEntry.Version);
311 }
312 
314  IO &IO, WasmYAML::SegmentInfo &SegmentInfo) {
315  IO.mapRequired("Index", SegmentInfo.Index);
316  IO.mapRequired("Name", SegmentInfo.Name);
317  IO.mapRequired("Alignment", SegmentInfo.Alignment);
318  IO.mapRequired("Flags", SegmentInfo.Flags);
319 }
320 
322  IO &IO, WasmYAML::LocalDecl &LocalDecl) {
323  IO.mapRequired("Type", LocalDecl.Type);
324  IO.mapRequired("Count", LocalDecl.Count);
325 }
326 
328  WasmYAML::Limits &Limits) {
329  if (!IO.outputting() || Limits.Flags)
330  IO.mapOptional("Flags", Limits.Flags);
331  IO.mapRequired("Initial", Limits.Initial);
332  if (!IO.outputting() || Limits.Flags & wasm::WASM_LIMITS_FLAG_HAS_MAX)
333  IO.mapOptional("Maximum", Limits.Maximum);
334 }
335 
337  IO &IO, WasmYAML::ElemSegment &Segment) {
338  IO.mapRequired("Offset", Segment.Offset);
339  IO.mapRequired("Functions", Segment.Functions);
340 }
341 
343  WasmYAML::Import &Import) {
344  IO.mapRequired("Module", Import.Module);
345  IO.mapRequired("Field", Import.Field);
346  IO.mapRequired("Kind", Import.Kind);
347  if (Import.Kind == wasm::WASM_EXTERNAL_FUNCTION) {
348  IO.mapRequired("SigIndex", Import.SigIndex);
349  } else if (Import.Kind == wasm::WASM_EXTERNAL_GLOBAL) {
350  IO.mapRequired("GlobalType", Import.GlobalImport.Type);
351  IO.mapRequired("GlobalMutable", Import.GlobalImport.Mutable);
352  } else if (Import.Kind == wasm::WASM_EXTERNAL_EVENT) {
353  IO.mapRequired("EventAttribute", Import.EventImport.Attribute);
354  IO.mapRequired("EventSigIndex", Import.EventImport.SigIndex);
355  } else if (Import.Kind == wasm::WASM_EXTERNAL_TABLE) {
356  IO.mapRequired("Table", Import.TableImport);
357  } else if (Import.Kind == wasm::WASM_EXTERNAL_MEMORY) {
358  IO.mapRequired("Memory", Import.Memory);
359  } else {
360  llvm_unreachable("unhandled import type");
361  }
362 }
363 
365  WasmYAML::Export &Export) {
366  IO.mapRequired("Name", Export.Name);
367  IO.mapRequired("Kind", Export.Kind);
368  IO.mapRequired("Index", Export.Index);
369 }
370 
372  WasmYAML::Global &Global) {
373  IO.mapRequired("Index", Global.Index);
374  IO.mapRequired("Type", Global.Type);
375  IO.mapRequired("Mutable", Global.Mutable);
376  IO.mapRequired("InitExpr", Global.InitExpr);
377 }
378 
380  wasm::WasmInitExpr &Expr) {
381  WasmYAML::Opcode Op = Expr.Opcode;
382  IO.mapRequired("Opcode", Op);
383  Expr.Opcode = Op;
384  switch (Expr.Opcode) {
386  IO.mapRequired("Value", Expr.Value.Int32);
387  break;
389  IO.mapRequired("Value", Expr.Value.Int64);
390  break;
392  IO.mapRequired("Value", Expr.Value.Float32);
393  break;
395  IO.mapRequired("Value", Expr.Value.Float64);
396  break;
398  IO.mapRequired("Index", Expr.Value.Global);
399  break;
400  }
401 }
402 
404  IO &IO, WasmYAML::DataSegment &Segment) {
405  IO.mapOptional("SectionOffset", Segment.SectionOffset);
406  IO.mapRequired("InitFlags", Segment.InitFlags);
408  IO.mapRequired("MemoryIndex", Segment.MemoryIndex);
409  } else {
410  Segment.MemoryIndex = 0;
411  }
412  if ((Segment.InitFlags & wasm::WASM_SEGMENT_IS_PASSIVE) == 0) {
413  IO.mapRequired("Offset", Segment.Offset);
414  } else {
416  Segment.Offset.Value.Int32 = 0;
417  }
418  IO.mapRequired("Content", Segment.Content);
419 }
420 
422  IO &IO, WasmYAML::InitFunction &Init) {
423  IO.mapRequired("Priority", Init.Priority);
424  IO.mapRequired("Symbol", Init.Symbol);
425 }
426 
427 void ScalarEnumerationTraits<WasmYAML::ComdatKind>::enumeration(
428  IO &IO, WasmYAML::ComdatKind &Kind) {
429 #define ECase(X) IO.enumCase(Kind, #X, wasm::WASM_COMDAT_##X);
430  ECase(FUNCTION);
431  ECase(DATA);
432 #undef ECase
433 }
434 
436  IO &IO, WasmYAML::ComdatEntry &ComdatEntry) {
437  IO.mapRequired("Kind", ComdatEntry.Kind);
438  IO.mapRequired("Index", ComdatEntry.Index);
439 }
440 
443  IO.mapRequired("Name", Comdat.Name);
444  IO.mapRequired("Entries", Comdat.Entries);
445 }
446 
449  IO.mapRequired("Index", Info.Index);
450  IO.mapRequired("Kind", Info.Kind);
451  IO.mapRequired("Name", Info.Name);
452  IO.mapRequired("Flags", Info.Flags);
454  IO.mapRequired("Function", Info.ElementIndex);
455  } else if (Info.Kind == wasm::WASM_SYMBOL_TYPE_GLOBAL) {
456  IO.mapRequired("Global", Info.ElementIndex);
457  } else if (Info.Kind == wasm::WASM_SYMBOL_TYPE_EVENT) {
458  IO.mapRequired("Event", Info.ElementIndex);
459  } else if (Info.Kind == wasm::WASM_SYMBOL_TYPE_DATA) {
460  if ((Info.Flags & wasm::WASM_SYMBOL_UNDEFINED) == 0) {
461  IO.mapRequired("Segment", Info.DataRef.Segment);
462  IO.mapOptional("Offset", Info.DataRef.Offset, 0u);
463  IO.mapRequired("Size", Info.DataRef.Size);
464  }
465  } else if (Info.Kind == wasm::WASM_SYMBOL_TYPE_SECTION) {
466  IO.mapRequired("Section", Info.ElementIndex);
467  } else {
468  llvm_unreachable("unsupported symbol kind");
469  }
470 }
471 
473  IO.mapRequired("Index", Event.Index);
474  IO.mapRequired("Attribute", Event.Attribute);
475  IO.mapRequired("SigIndex", Event.SigIndex);
476 }
477 
478 void ScalarBitSetTraits<WasmYAML::LimitFlags>::bitset(
479  IO &IO, WasmYAML::LimitFlags &Value) {
480 #define BCase(X) IO.bitSetCase(Value, #X, wasm::WASM_LIMITS_FLAG_##X)
481  BCase(HAS_MAX);
482  BCase(IS_SHARED);
483 #undef BCase
484 }
485 
486 void ScalarBitSetTraits<WasmYAML::SegmentFlags>::bitset(
487  IO &IO, WasmYAML::SegmentFlags &Value) {}
488 
489 void ScalarBitSetTraits<WasmYAML::SymbolFlags>::bitset(
490  IO &IO, WasmYAML::SymbolFlags &Value) {
491 #define BCaseMask(M, X) \
492  IO.maskedBitSetCase(Value, #X, wasm::WASM_SYMBOL_##X, wasm::WASM_SYMBOL_##M)
493  // BCaseMask(BINDING_MASK, BINDING_GLOBAL);
494  BCaseMask(BINDING_MASK, BINDING_WEAK);
495  BCaseMask(BINDING_MASK, BINDING_LOCAL);
496  // BCaseMask(VISIBILITY_MASK, VISIBILITY_DEFAULT);
497  BCaseMask(VISIBILITY_MASK, VISIBILITY_HIDDEN);
498  BCaseMask(UNDEFINED, UNDEFINED);
499  BCaseMask(EXPORTED, EXPORTED);
500 #undef BCaseMask
501 }
502 
503 void ScalarEnumerationTraits<WasmYAML::SymbolKind>::enumeration(
504  IO &IO, WasmYAML::SymbolKind &Kind) {
505 #define ECase(X) IO.enumCase(Kind, #X, wasm::WASM_SYMBOL_TYPE_##X);
506  ECase(FUNCTION);
507  ECase(DATA);
508  ECase(GLOBAL);
509  ECase(SECTION);
510  ECase(EVENT);
511 #undef ECase
512 }
513 
514 void ScalarEnumerationTraits<WasmYAML::ValueType>::enumeration(
515  IO &IO, WasmYAML::ValueType &Type) {
516 #define ECase(X) IO.enumCase(Type, #X, wasm::WASM_TYPE_##X);
517  ECase(I32);
518  ECase(I64);
519  ECase(F32);
520  ECase(F64);
521  ECase(V128);
522  ECase(FUNCREF);
523  ECase(FUNC);
524  ECase(NORESULT);
525 #undef ECase
526 }
527 
528 void ScalarEnumerationTraits<WasmYAML::ExportKind>::enumeration(
529  IO &IO, WasmYAML::ExportKind &Kind) {
530 #define ECase(X) IO.enumCase(Kind, #X, wasm::WASM_EXTERNAL_##X);
531  ECase(FUNCTION);
532  ECase(TABLE);
533  ECase(MEMORY);
534  ECase(GLOBAL);
535  ECase(EVENT);
536 #undef ECase
537 }
538 
539 void ScalarEnumerationTraits<WasmYAML::Opcode>::enumeration(
540  IO &IO, WasmYAML::Opcode &Code) {
541 #define ECase(X) IO.enumCase(Code, #X, wasm::WASM_OPCODE_##X);
542  ECase(END);
543  ECase(I32_CONST);
544  ECase(I64_CONST);
545  ECase(F64_CONST);
546  ECase(F32_CONST);
547  ECase(GLOBAL_GET);
548 #undef ECase
549 }
550 
551 void ScalarEnumerationTraits<WasmYAML::TableType>::enumeration(
552  IO &IO, WasmYAML::TableType &Type) {
553 #define ECase(X) IO.enumCase(Type, #X, wasm::WASM_TYPE_##X);
554  ECase(FUNCREF);
555 #undef ECase
556 }
557 
558 void ScalarEnumerationTraits<WasmYAML::RelocType>::enumeration(
559  IO &IO, WasmYAML::RelocType &Type) {
560 #define WASM_RELOC(name, value) IO.enumCase(Type, #name, wasm::name);
561 #include "llvm/BinaryFormat/WasmRelocs.def"
562 #undef WASM_RELOC
563 }
564 
565 } // end namespace yaml
566 
567 } // end namespace llvm
std::vector< InitFunction > InitFunctions
Definition: WasmYAML.h:228
std::vector< Comdat > Comdats
Definition: WasmYAML.h:229
std::vector< Relocation > Relocations
Definition: WasmYAML.h:176
std::vector< Limits > Memories
Definition: WasmYAML.h:292
std::vector< Signature > Signatures
Definition: WasmYAML.h:252
This class represents lattice values for constants.
Definition: AllocatorList.h:23
yaml::BinaryRef Body
Definition: WasmYAML.h:103
std::vector< std::unique_ptr< Section > > Sections
Definition: WasmYAML.h:367
wasm::WasmInitExpr InitExpr
Definition: WasmYAML.h:73
yaml::BinaryRef Content
Definition: WasmYAML.h:118
#define BCase(X)
std::vector< Import > Imports
Definition: WasmYAML.h:262
std::vector< ProducerEntry > Languages
Definition: WasmYAML.h:240
wasm::WasmInitExpr Offset
Definition: WasmYAML.h:65
const unsigned WASM_SYMBOL_UNDEFINED
Definition: Wasm.h:298
std::vector< SegmentInfo > SegmentInfos
Definition: WasmYAML.h:227
std::vector< SymbolInfo > SymbolTable
Definition: WasmYAML.h:226
std::vector< Function > Functions
Definition: WasmYAML.h:352
yaml::Hex32 Initial
Definition: WasmYAML.h:48
Analysis containing CSE Info
Definition: CSEInfo.cpp:20
std::vector< ComdatEntry > Entries
Definition: WasmYAML.h:168
This file declares classes for handling the YAML representation of wasm binaries. ...
uint32_t Attribute
Definition: WasmYAML.h:78
yaml::Hex32 Maximum
Definition: WasmYAML.h:49
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:45
std::vector< Export > Exports
Definition: WasmYAML.h:322
#define BCaseMask(M, X)
std::vector< ProducerEntry > Tools
Definition: WasmYAML.h:241
static void sectionMapping(IO &IO, WasmYAML::DataSection &Section)
Definition: WasmYAML.cpp:145
std::vector< uint32_t > FunctionTypes
Definition: WasmYAML.h:272
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
std::vector< ProducerEntry > SDKs
Definition: WasmYAML.h:242
#define ECase(X)
ValueType
Value types.
TableType ElemType
Definition: WasmYAML.h:53
std::vector< Table > Tables
Definition: WasmYAML.h:282
LimitFlags Flags
Definition: WasmYAML.h:47
std::vector< ElemSegment > Segments
Definition: WasmYAML.h:342
std::vector< Event > Events
Definition: WasmYAML.h:312
std::vector< uint32_t > Functions
Definition: WasmYAML.h:66
std::vector< DataSegment > Segments
Definition: WasmYAML.h:362
wasm::WasmDataReference DataRef
Definition: WasmYAML.h:152
std::vector< ValueType > ParamTypes
Definition: WasmYAML.h:141
SymbolKind
Duplicate copy of the above enum, but using the official CV names.
Definition: CodeView.h:47
std::vector< LocalDecl > Locals
Definition: WasmYAML.h:102
yaml::BinaryRef Payload
Definition: WasmYAML.h:188
std::vector< NameEntry > FunctionNames
Definition: WasmYAML.h:214
const unsigned Kind
std::vector< Global > Globals
Definition: WasmYAML.h:302
union llvm::wasm::WasmInitExpr::@148 Value
LLVM Value Representation.
Definition: Value.h:72
wasm::WasmInitExpr Offset
Definition: WasmYAML.h:117
static void commonSectionMapping(IO &IO, WasmYAML::Section &Section)
Definition: WasmYAML.cpp:45
const char SectionName[]
Definition: AMDGPUPTNote.h:23
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
SectionType
These are the section type and attributes fields.
Definition: MachO.h:114