LLVM  15.0.0git
WasmYAML.h
Go to the documentation of this file.
1 //===- WasmYAML.h - Wasm YAMLIO implementation ------------------*- 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 /// \file
10 /// This file declares classes for handling the YAML representation
11 /// of wasm binaries.
12 ///
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_OBJECTYAML_WASMYAML_H
16 #define LLVM_OBJECTYAML_WASMYAML_H
17 
18 #include "llvm/ADT/StringRef.h"
19 #include "llvm/BinaryFormat/Wasm.h"
20 #include "llvm/ObjectYAML/YAML.h"
21 #include "llvm/Support/Casting.h"
22 #include <cstdint>
23 #include <memory>
24 #include <vector>
25 
26 namespace llvm {
27 namespace WasmYAML {
28 
32 LLVM_YAML_STRONG_TYPEDEF(uint32_t, SignatureForm)
41 LLVM_YAML_STRONG_TYPEDEF(uint32_t, FeaturePolicyPrefix)
42 
43 struct FileHeader {
44  yaml::Hex32 Version;
45 };
46 
47 struct Limits {
48  LimitFlags Flags;
49  yaml::Hex32 Minimum;
50  yaml::Hex32 Maximum;
51 };
52 
53 struct Table {
54  TableType ElemType;
57 };
58 
59 struct Export {
61  ExportKind Kind;
63 };
64 
65 struct InitExpr {
66  InitExpr() {}
67  bool Extended;
68  union {
71  };
72 };
73 
74 struct ElemSegment {
79  std::vector<uint32_t> Functions;
80 };
81 
82 struct Global {
85  bool Mutable;
87 };
88 
89 struct Import {
90  Import() {}
93  ExportKind Kind;
94  union {
100  };
101 };
102 
103 struct LocalDecl {
106 };
107 
108 struct Function {
110  std::vector<LocalDecl> Locals;
112 };
113 
114 struct Relocation {
115  RelocType Type;
117  // TODO(wvo): this would strictly be better as Hex64, but that will change
118  // all existing obj2yaml output.
119  yaml::Hex32 Offset;
120  int64_t Addend;
121 };
122 
123 struct DataSegment {
129 };
130 
131 struct NameEntry {
134 };
135 
137  std::string Name;
138  std::string Version;
139 };
140 
141 struct FeatureEntry {
142  FeaturePolicyPrefix Prefix;
143  std::string Name;
144 };
145 
146 struct SegmentInfo {
150  SegmentFlags Flags;
151 };
152 
153 struct Signature {
155  SignatureForm Form = wasm::WASM_TYPE_FUNC;
156  std::vector<ValueType> ParamTypes;
157  std::vector<ValueType> ReturnTypes;
158 };
159 
160 struct SymbolInfo {
165  union {
168  };
169 };
170 
171 struct InitFunction {
174 };
175 
176 struct ComdatEntry {
177  ComdatKind Kind;
179 };
180 
181 struct Comdat {
183  std::vector<ComdatEntry> Entries;
184 };
185 
186 struct Section {
188  virtual ~Section();
189 
191  std::vector<Relocation> Relocations;
192 };
193 
196  : Section(wasm::WASM_SEC_CUSTOM), Name(Name) {}
197 
198  static bool classof(const Section *S) {
199  return S->Type == wasm::WASM_SEC_CUSTOM;
200  }
201 
204 };
205 
210 };
211 
215 };
216 
218  DylinkSection() : CustomSection("dylink.0") {}
219 
220  static bool classof(const Section *S) {
221  auto C = dyn_cast<CustomSection>(S);
222  return C && C->Name == "dylink.0";
223  }
224 
229  std::vector<StringRef> Needed;
230  std::vector<DylinkImportInfo> ImportInfo;
231  std::vector<DylinkExportInfo> ExportInfo;
232 };
233 
235  NameSection() : CustomSection("name") {}
236 
237  static bool classof(const Section *S) {
238  auto C = dyn_cast<CustomSection>(S);
239  return C && C->Name == "name";
240  }
241 
242  std::vector<NameEntry> FunctionNames;
243  std::vector<NameEntry> GlobalNames;
244  std::vector<NameEntry> DataSegmentNames;
245 };
246 
248  LinkingSection() : CustomSection("linking") {}
249 
250  static bool classof(const Section *S) {
251  auto C = dyn_cast<CustomSection>(S);
252  return C && C->Name == "linking";
253  }
254 
256  std::vector<SymbolInfo> SymbolTable;
257  std::vector<SegmentInfo> SegmentInfos;
258  std::vector<InitFunction> InitFunctions;
259  std::vector<Comdat> Comdats;
260 };
261 
263  ProducersSection() : CustomSection("producers") {}
264 
265  static bool classof(const Section *S) {
266  auto C = dyn_cast<CustomSection>(S);
267  return C && C->Name == "producers";
268  }
269 
270  std::vector<ProducerEntry> Languages;
271  std::vector<ProducerEntry> Tools;
272  std::vector<ProducerEntry> SDKs;
273 };
274 
276  TargetFeaturesSection() : CustomSection("target_features") {}
277 
278  static bool classof(const Section *S) {
279  auto C = dyn_cast<CustomSection>(S);
280  return C && C->Name == "target_features";
281  }
282 
283  std::vector<FeatureEntry> Features;
284 };
285 
288 
289  static bool classof(const Section *S) {
290  return S->Type == wasm::WASM_SEC_TYPE;
291  }
292 
293  std::vector<Signature> Signatures;
294 };
295 
298 
299  static bool classof(const Section *S) {
300  return S->Type == wasm::WASM_SEC_IMPORT;
301  }
302 
303  std::vector<Import> Imports;
304 };
305 
308 
309  static bool classof(const Section *S) {
310  return S->Type == wasm::WASM_SEC_FUNCTION;
311  }
312 
313  std::vector<uint32_t> FunctionTypes;
314 };
315 
318 
319  static bool classof(const Section *S) {
320  return S->Type == wasm::WASM_SEC_TABLE;
321  }
322 
323  std::vector<Table> Tables;
324 };
325 
328 
329  static bool classof(const Section *S) {
330  return S->Type == wasm::WASM_SEC_MEMORY;
331  }
332 
333  std::vector<Limits> Memories;
334 };
335 
336 struct TagSection : Section {
338 
339  static bool classof(const Section *S) {
340  return S->Type == wasm::WASM_SEC_TAG;
341  }
342 
343  std::vector<uint32_t> TagTypes;
344 };
345 
348 
349  static bool classof(const Section *S) {
350  return S->Type == wasm::WASM_SEC_GLOBAL;
351  }
352 
353  std::vector<Global> Globals;
354 };
355 
358 
359  static bool classof(const Section *S) {
360  return S->Type == wasm::WASM_SEC_EXPORT;
361  }
362 
363  std::vector<Export> Exports;
364 };
365 
368 
369  static bool classof(const Section *S) {
370  return S->Type == wasm::WASM_SEC_START;
371  }
372 
374 };
375 
378 
379  static bool classof(const Section *S) {
380  return S->Type == wasm::WASM_SEC_ELEM;
381  }
382 
383  std::vector<ElemSegment> Segments;
384 };
385 
388 
389  static bool classof(const Section *S) {
390  return S->Type == wasm::WASM_SEC_CODE;
391  }
392 
393  std::vector<Function> Functions;
394 };
395 
398 
399  static bool classof(const Section *S) {
400  return S->Type == wasm::WASM_SEC_DATA;
401  }
402 
403  std::vector<DataSegment> Segments;
404 };
405 
408 
409  static bool classof(const Section *S) {
410  return S->Type == wasm::WASM_SEC_DATACOUNT;
411  }
412 
414 };
415 
416 struct Object {
418  std::vector<std::unique_ptr<Section>> Sections;
419 };
420 
421 } // end namespace WasmYAML
422 } // end namespace llvm
423 
424 LLVM_YAML_IS_SEQUENCE_VECTOR(std::unique_ptr<llvm::WasmYAML::Section>)
447 
448 namespace llvm {
449 namespace yaml {
450 
451 template <> struct MappingTraits<WasmYAML::FileHeader> {
452  static void mapping(IO &IO, WasmYAML::FileHeader &FileHdr);
453 };
454 
455 template <> struct MappingTraits<std::unique_ptr<WasmYAML::Section>> {
456  static void mapping(IO &IO, std::unique_ptr<WasmYAML::Section> &Section);
457 };
458 
459 template <> struct MappingTraits<WasmYAML::Object> {
460  static void mapping(IO &IO, WasmYAML::Object &Object);
461 };
462 
463 template <> struct MappingTraits<WasmYAML::Import> {
464  static void mapping(IO &IO, WasmYAML::Import &Import);
465 };
466 
467 template <> struct MappingTraits<WasmYAML::Export> {
468  static void mapping(IO &IO, WasmYAML::Export &Export);
469 };
470 
471 template <> struct MappingTraits<WasmYAML::Global> {
472  static void mapping(IO &IO, WasmYAML::Global &Global);
473 };
474 
475 template <> struct ScalarBitSetTraits<WasmYAML::LimitFlags> {
476  static void bitset(IO &IO, WasmYAML::LimitFlags &Value);
477 };
478 
479 template <> struct ScalarBitSetTraits<WasmYAML::SymbolFlags> {
480  static void bitset(IO &IO, WasmYAML::SymbolFlags &Value);
481 };
482 
483 template <> struct ScalarEnumerationTraits<WasmYAML::SymbolKind> {
484  static void enumeration(IO &IO, WasmYAML::SymbolKind &Kind);
485 };
486 
487 template <> struct ScalarBitSetTraits<WasmYAML::SegmentFlags> {
488  static void bitset(IO &IO, WasmYAML::SegmentFlags &Value);
489 };
490 
491 template <> struct ScalarEnumerationTraits<WasmYAML::SectionType> {
492  static void enumeration(IO &IO, WasmYAML::SectionType &Type);
493 };
494 
495 template <> struct MappingTraits<WasmYAML::Signature> {
496  static void mapping(IO &IO, WasmYAML::Signature &Signature);
497 };
498 
499 template <> struct MappingTraits<WasmYAML::Table> {
500  static void mapping(IO &IO, WasmYAML::Table &Table);
501 };
502 
503 template <> struct MappingTraits<WasmYAML::Limits> {
504  static void mapping(IO &IO, WasmYAML::Limits &Limits);
505 };
506 
507 template <> struct MappingTraits<WasmYAML::Function> {
508  static void mapping(IO &IO, WasmYAML::Function &Function);
509 };
510 
511 template <> struct MappingTraits<WasmYAML::Relocation> {
512  static void mapping(IO &IO, WasmYAML::Relocation &Relocation);
513 };
514 
515 template <> struct MappingTraits<WasmYAML::NameEntry> {
516  static void mapping(IO &IO, WasmYAML::NameEntry &NameEntry);
517 };
518 
519 template <> struct MappingTraits<WasmYAML::ProducerEntry> {
520  static void mapping(IO &IO, WasmYAML::ProducerEntry &ProducerEntry);
521 };
522 
523 template <> struct ScalarEnumerationTraits<WasmYAML::FeaturePolicyPrefix> {
524  static void enumeration(IO &IO, WasmYAML::FeaturePolicyPrefix &Prefix);
525 };
526 
527 template <> struct MappingTraits<WasmYAML::FeatureEntry> {
528  static void mapping(IO &IO, WasmYAML::FeatureEntry &FeatureEntry);
529 };
530 
531 template <> struct MappingTraits<WasmYAML::SegmentInfo> {
532  static void mapping(IO &IO, WasmYAML::SegmentInfo &SegmentInfo);
533 };
534 
535 template <> struct MappingTraits<WasmYAML::LocalDecl> {
536  static void mapping(IO &IO, WasmYAML::LocalDecl &LocalDecl);
537 };
538 
539 template <> struct MappingTraits<WasmYAML::InitExpr> {
540  static void mapping(IO &IO, WasmYAML::InitExpr &Expr);
541 };
542 
543 template <> struct MappingTraits<WasmYAML::DataSegment> {
544  static void mapping(IO &IO, WasmYAML::DataSegment &Segment);
545 };
546 
547 template <> struct MappingTraits<WasmYAML::ElemSegment> {
548  static void mapping(IO &IO, WasmYAML::ElemSegment &Segment);
549 };
550 
551 template <> struct MappingTraits<WasmYAML::SymbolInfo> {
552  static void mapping(IO &IO, WasmYAML::SymbolInfo &Info);
553 };
554 
555 template <> struct MappingTraits<WasmYAML::InitFunction> {
556  static void mapping(IO &IO, WasmYAML::InitFunction &Init);
557 };
558 
559 template <> struct ScalarEnumerationTraits<WasmYAML::ComdatKind> {
560  static void enumeration(IO &IO, WasmYAML::ComdatKind &Kind);
561 };
562 
563 template <> struct MappingTraits<WasmYAML::ComdatEntry> {
564  static void mapping(IO &IO, WasmYAML::ComdatEntry &ComdatEntry);
565 };
566 
567 template <> struct MappingTraits<WasmYAML::Comdat> {
568  static void mapping(IO &IO, WasmYAML::Comdat &Comdat);
569 };
570 
571 template <> struct ScalarEnumerationTraits<WasmYAML::ValueType> {
572  static void enumeration(IO &IO, WasmYAML::ValueType &Type);
573 };
574 
575 template <> struct ScalarEnumerationTraits<WasmYAML::ExportKind> {
576  static void enumeration(IO &IO, WasmYAML::ExportKind &Kind);
577 };
578 
579 template <> struct ScalarEnumerationTraits<WasmYAML::TableType> {
580  static void enumeration(IO &IO, WasmYAML::TableType &Type);
581 };
582 
583 template <> struct ScalarEnumerationTraits<WasmYAML::Opcode> {
584  static void enumeration(IO &IO, WasmYAML::Opcode &Opcode);
585 };
586 
587 template <> struct ScalarEnumerationTraits<WasmYAML::RelocType> {
588  static void enumeration(IO &IO, WasmYAML::RelocType &Kind);
589 };
590 
591 template <> struct MappingTraits<WasmYAML::DylinkImportInfo> {
592  static void mapping(IO &IO, WasmYAML::DylinkImportInfo &Info);
593 };
594 
595 template <> struct MappingTraits<WasmYAML::DylinkExportInfo> {
596  static void mapping(IO &IO, WasmYAML::DylinkExportInfo &Info);
597 };
598 
599 } // end namespace yaml
600 } // end namespace llvm
601 
602 #endif // LLVM_OBJECTYAML_WASMYAML_H
llvm::WasmYAML::LinkingSection::SymbolTable
std::vector< SymbolInfo > SymbolTable
Definition: WasmYAML.h:256
llvm::WasmYAML::TableSection::Tables
std::vector< Table > Tables
Definition: WasmYAML.h:323
llvm::WasmYAML::GlobalSection
Definition: WasmYAML.h:346
llvm::WasmYAML::FileHeader
Definition: WasmYAML.h:43
llvm::WasmYAML::Function::Locals
std::vector< LocalDecl > Locals
Definition: WasmYAML.h:110
llvm::WasmYAML::ProducerEntry::Name
std::string Name
Definition: WasmYAML.h:137
llvm::WasmYAML::FeatureEntry::Name
std::string Name
Definition: WasmYAML.h:143
llvm::WasmYAML::Section::Relocations
std::vector< Relocation > Relocations
Definition: WasmYAML.h:191
llvm::WasmYAML::InitFunction
Definition: WasmYAML.h:171
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::WasmYAML::Object::Sections
std::vector< std::unique_ptr< Section > > Sections
Definition: WasmYAML.h:418
llvm::WasmYAML::DylinkExportInfo::Name
StringRef Name
Definition: WasmYAML.h:213
llvm::WasmYAML::Section::~Section
virtual ~Section()
llvm::wasm::WASM_SEC_GLOBAL
@ WASM_SEC_GLOBAL
Definition: Wasm.h:248
llvm::WasmYAML::ProducersSection
Definition: WasmYAML.h:262
llvm::WasmYAML::ProducersSection::Tools
std::vector< ProducerEntry > Tools
Definition: WasmYAML.h:271
llvm::WasmYAML::StartSection::StartFunction
uint32_t StartFunction
Definition: WasmYAML.h:373
llvm::WasmYAML::InitFunction::Priority
uint32_t Priority
Definition: WasmYAML.h:172
llvm::WasmYAML::SymbolInfo::Index
uint32_t Index
Definition: WasmYAML.h:161
llvm::WasmYAML::NameEntry::Index
uint32_t Index
Definition: WasmYAML.h:132
llvm::WasmYAML::FileHeader::Version
yaml::Hex32 Version
Definition: WasmYAML.h:44
llvm::WasmYAML::LocalDecl
Definition: WasmYAML.h:103
llvm::cl::Prefix
@ Prefix
Definition: CommandLine.h:160
llvm::WasmYAML::NameSection::NameSection
NameSection()
Definition: WasmYAML.h:235
llvm::Function
Definition: Function.h:60
StringRef.h
llvm::WasmYAML::Import::SigIndex
uint32_t SigIndex
Definition: WasmYAML.h:95
llvm::WasmYAML::Comdat
Definition: WasmYAML.h:181
llvm::codeview::SymbolKind
SymbolKind
Duplicate copy of the above enum, but using the official CV names.
Definition: CodeView.h:47
llvm::dwarf::Form
Form
Definition: Dwarf.h:132
llvm::WasmYAML::InitFunction::Symbol
uint32_t Symbol
Definition: WasmYAML.h:173
llvm::WasmYAML::FunctionSection::FunctionTypes
std::vector< uint32_t > FunctionTypes
Definition: WasmYAML.h:313
llvm::WasmYAML::DylinkExportInfo
Definition: WasmYAML.h:212
llvm::WasmYAML::TableSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:319
llvm::WasmYAML::LinkingSection::LinkingSection
LinkingSection()
Definition: WasmYAML.h:248
LLVM_YAML_IS_SEQUENCE_VECTOR
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
llvm::WasmYAML::DataSection
Definition: WasmYAML.h:396
llvm::WasmYAML::DataSection::DataSection
DataSection()
Definition: WasmYAML.h:397
llvm::WasmYAML::ElemSection::ElemSection
ElemSection()
Definition: WasmYAML.h:377
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::WasmYAML::TableSection
Definition: WasmYAML.h:316
llvm::WasmYAML::ElemSection
Definition: WasmYAML.h:376
llvm::WasmYAML::SegmentInfo::Name
StringRef Name
Definition: WasmYAML.h:148
llvm::WasmYAML::ElemSegment
Definition: WasmYAML.h:74
llvm::WasmYAML::Relocation::Offset
yaml::Hex32 Offset
Definition: WasmYAML.h:119
llvm::WasmYAML::MemorySection
Definition: WasmYAML.h:326
llvm::WasmYAML::NameSection::GlobalNames
std::vector< NameEntry > GlobalNames
Definition: WasmYAML.h:243
llvm::WasmYAML::DataSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:399
llvm::yaml::MappingTraits
Definition: ModuleSummaryIndex.h:51
llvm::WasmYAML::ImportSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:299
llvm::WasmYAML::GlobalSection::Globals
std::vector< Global > Globals
Definition: WasmYAML.h:353
llvm::WasmYAML::ProducerEntry
Definition: WasmYAML.h:136
llvm::WasmYAML::CustomSection::Name
StringRef Name
Definition: WasmYAML.h:202
llvm::wasm::WasmDataReference
Definition: Wasm.h:185
llvm::MachO::SymbolFlags
SymbolFlags
Symbol flags.
Definition: Symbol.h:24
llvm::WasmYAML::LinkingSection::Comdats
std::vector< Comdat > Comdats
Definition: WasmYAML.h:259
llvm::WasmYAML::Import
Definition: WasmYAML.h:89
llvm::WasmYAML::DylinkImportInfo::Field
StringRef Field
Definition: WasmYAML.h:208
llvm::wasm::WASM_SEC_CUSTOM
@ WASM_SEC_CUSTOM
Definition: Wasm.h:242
llvm::WasmYAML::Import::TableImport
Table TableImport
Definition: WasmYAML.h:96
llvm::WasmYAML::CustomSection
Definition: WasmYAML.h:194
llvm::WasmYAML::ProducerEntry::Version
std::string Version
Definition: WasmYAML.h:138
llvm::wasm::WASM_SEC_TAG
@ WASM_SEC_TAG
Definition: Wasm.h:255
llvm::WasmYAML::ComdatEntry::Index
uint32_t Index
Definition: WasmYAML.h:178
llvm::WasmYAML::InitExpr::Inst
wasm::WasmInitExprMVP Inst
Definition: WasmYAML.h:69
llvm::WasmYAML::SegmentInfo::Index
uint32_t Index
Definition: WasmYAML.h:147
llvm::WasmYAML::Comdat::Name
StringRef Name
Definition: WasmYAML.h:182
llvm::WasmYAML::NameSection
Definition: WasmYAML.h:234
llvm::WasmYAML::DataSegment::Content
yaml::BinaryRef Content
Definition: WasmYAML.h:128
llvm::WasmYAML::GlobalSection::GlobalSection
GlobalSection()
Definition: WasmYAML.h:347
llvm::WasmYAML::Section
Definition: WasmYAML.h:186
llvm::WasmYAML::Relocation::Type
RelocType Type
Definition: WasmYAML.h:115
llvm::WasmYAML::Global::Index
uint32_t Index
Definition: WasmYAML.h:83
llvm::WasmYAML::Export::Kind
ExportKind Kind
Definition: WasmYAML.h:61
llvm::WasmYAML::FunctionSection
Definition: WasmYAML.h:306
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::WasmYAML::LinkingSection::Version
uint32_t Version
Definition: WasmYAML.h:255
llvm::wasm::WASM_SEC_MEMORY
@ WASM_SEC_MEMORY
Definition: Wasm.h:247
llvm::wasm::WASM_SEC_DATACOUNT
@ WASM_SEC_DATACOUNT
Definition: Wasm.h:254
llvm::WasmYAML::ProducersSection::ProducersSection
ProducersSection()
Definition: WasmYAML.h:263
llvm::WasmYAML::DylinkExportInfo::Flags
SymbolFlags Flags
Definition: WasmYAML.h:214
llvm::WasmYAML::CodeSection::CodeSection
CodeSection()
Definition: WasmYAML.h:387
llvm::WasmYAML::Limits::Maximum
yaml::Hex32 Maximum
Definition: WasmYAML.h:50
llvm::WasmYAML::ComdatEntry
Definition: WasmYAML.h:176
llvm::WasmYAML::Signature::ReturnTypes
std::vector< ValueType > ReturnTypes
Definition: WasmYAML.h:157
llvm::WasmYAML::CodeSection
Definition: WasmYAML.h:386
llvm::wasm::WASM_SEC_TABLE
@ WASM_SEC_TABLE
Definition: Wasm.h:246
YAML.h
llvm::WasmYAML::SymbolInfo::Flags
SymbolFlags Flags
Definition: WasmYAML.h:164
llvm::WasmYAML::NameEntry
Definition: WasmYAML.h:131
llvm::WasmYAML::Table::TableLimits
Limits TableLimits
Definition: WasmYAML.h:55
llvm::WasmYAML::SegmentInfo::Flags
SegmentFlags Flags
Definition: WasmYAML.h:150
llvm::wasm::WASM_SEC_START
@ WASM_SEC_START
Definition: Wasm.h:250
llvm::WasmYAML::LinkingSection::SegmentInfos
std::vector< SegmentInfo > SegmentInfos
Definition: WasmYAML.h:257
llvm::WasmYAML::Export::Name
StringRef Name
Definition: WasmYAML.h:60
llvm::WasmYAML::SymbolInfo
Definition: WasmYAML.h:160
llvm::WasmYAML::Function
Definition: WasmYAML.h:108
llvm::WasmYAML::ImportSection::ImportSection
ImportSection()
Definition: WasmYAML.h:297
llvm::WasmYAML::TargetFeaturesSection::Features
std::vector< FeatureEntry > Features
Definition: WasmYAML.h:283
Info
Analysis containing CSE Info
Definition: CSEInfo.cpp:27
llvm::WasmYAML::Limits
Definition: WasmYAML.h:47
llvm::WasmYAML::Import::Module
StringRef Module
Definition: WasmYAML.h:91
llvm::WasmYAML::Import::GlobalImport
Global GlobalImport
Definition: WasmYAML.h:99
llvm::WasmYAML::DylinkImportInfo
Definition: WasmYAML.h:206
llvm::wasm::WASM_SEC_FUNCTION
@ WASM_SEC_FUNCTION
Definition: Wasm.h:245
llvm::Comdat
Definition: Comdat.h:33
llvm::wasm::WASM_SEC_EXPORT
@ WASM_SEC_EXPORT
Definition: Wasm.h:249
llvm::WasmYAML::Global::Init
InitExpr Init
Definition: WasmYAML.h:86
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
llvm::PassSummaryAction::Import
@ Import
Import information from summary.
llvm::WasmYAML::ExportSection
Definition: WasmYAML.h:356
llvm::WasmYAML::Signature::Index
uint32_t Index
Definition: WasmYAML.h:154
llvm::WasmYAML::DataSegment::Offset
InitExpr Offset
Definition: WasmYAML.h:127
llvm::WasmYAML::ElemSegment::Functions
std::vector< uint32_t > Functions
Definition: WasmYAML.h:79
llvm::WasmYAML::Object::Header
FileHeader Header
Definition: WasmYAML.h:417
llvm::WasmYAML::Function::Index
uint32_t Index
Definition: WasmYAML.h:109
llvm::WasmYAML::Section::Type
SectionType Type
Definition: WasmYAML.h:190
llvm::WasmYAML::ElemSegment::Flags
uint32_t Flags
Definition: WasmYAML.h:75
llvm::WasmYAML::SegmentInfo
Definition: WasmYAML.h:146
llvm::WasmYAML::CustomSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:198
llvm::OutputFileType::Object
@ Object
llvm::WasmYAML::InitExpr::Body
yaml::BinaryRef Body
Definition: WasmYAML.h:70
llvm::WasmYAML::ExportSection::Exports
std::vector< Export > Exports
Definition: WasmYAML.h:363
llvm::WasmYAML::SymbolInfo::Kind
SymbolKind Kind
Definition: WasmYAML.h:163
llvm::wasm::WASM_SEC_IMPORT
@ WASM_SEC_IMPORT
Definition: Wasm.h:244
llvm::WasmYAML::Relocation::Index
uint32_t Index
Definition: WasmYAML.h:116
llvm::WasmYAML::MemorySection::MemorySection
MemorySection()
Definition: WasmYAML.h:327
llvm::WasmYAML::CustomSection::CustomSection
CustomSection(StringRef Name)
Definition: WasmYAML.h:195
llvm::WasmYAML::TargetFeaturesSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:278
llvm::WasmYAML::Global::Type
ValueType Type
Definition: WasmYAML.h:84
llvm::WasmYAML::CustomSection::Payload
yaml::BinaryRef Payload
Definition: WasmYAML.h:203
llvm::WasmYAML::FunctionSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:309
llvm::WasmYAML::TagSection::TagSection
TagSection()
Definition: WasmYAML.h:337
llvm::WasmYAML::Table::Index
uint32_t Index
Definition: WasmYAML.h:56
llvm::WasmYAML::ElemSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:379
llvm::WasmYAML::Table
Definition: WasmYAML.h:53
llvm::wasm::WASM_SEC_DATA
@ WASM_SEC_DATA
Definition: Wasm.h:253
LLVM_YAML_STRONG_TYPEDEF
#define LLVM_YAML_STRONG_TYPEDEF(_base, _type)
llvm::WasmYAML::StartSection
Definition: WasmYAML.h:366
llvm::wasm::WasmInitExprMVP
Definition: Wasm.h:94
llvm::WasmYAML::InitExpr
Definition: WasmYAML.h:65
llvm::WasmYAML::TypeSection::Signatures
std::vector< Signature > Signatures
Definition: WasmYAML.h:293
llvm::WasmYAML::TargetFeaturesSection
Definition: WasmYAML.h:275
llvm::WasmYAML::GlobalSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:349
llvm::WasmYAML::SymbolInfo::Name
StringRef Name
Definition: WasmYAML.h:162
llvm::wasm::WASM_TYPE_FUNC
@ WASM_TYPE_FUNC
Definition: Wasm.h:268
llvm::WasmYAML::TagSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:339
llvm::AMDGPU::HSAMD::ValueType
ValueType
Value types.
Definition: AMDGPUMetadata.h:100
llvm::WasmYAML::FeatureEntry
Definition: WasmYAML.h:141
llvm::WasmYAML::Table::ElemType
TableType ElemType
Definition: WasmYAML.h:54
llvm::WasmYAML::StartSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:369
llvm::WasmYAML::FeatureEntry::Prefix
FeaturePolicyPrefix Prefix
Definition: WasmYAML.h:142
llvm::WasmYAML::TypeSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:289
llvm::WasmYAML::ElemSegment::TableNumber
uint32_t TableNumber
Definition: WasmYAML.h:76
llvm::WasmYAML::DataCountSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:409
llvm::WasmYAML::CodeSection::Functions
std::vector< Function > Functions
Definition: WasmYAML.h:393
llvm::WasmYAML::Signature
Definition: WasmYAML.h:153
llvm::WasmYAML::Global::Mutable
bool Mutable
Definition: WasmYAML.h:85
llvm::WasmYAML::Import::Field
StringRef Field
Definition: WasmYAML.h:92
llvm::WasmYAML::ComdatEntry::Kind
ComdatKind Kind
Definition: WasmYAML.h:177
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::yaml::BinaryRef
Specialized YAMLIO scalar type for representing a binary blob.
Definition: YAML.h:63
llvm::WasmYAML::Relocation::Addend
int64_t Addend
Definition: WasmYAML.h:120
uint32_t
llvm::wasm::WASM_SEC_ELEM
@ WASM_SEC_ELEM
Definition: Wasm.h:251
llvm::WasmYAML::StartSection::StartSection
StartSection()
Definition: WasmYAML.h:367
llvm::WasmYAML::ProducersSection::SDKs
std::vector< ProducerEntry > SDKs
Definition: WasmYAML.h:272
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::WasmYAML::CodeSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:389
llvm::WasmYAML::LocalDecl::Count
uint32_t Count
Definition: WasmYAML.h:105
llvm::WasmYAML::DylinkImportInfo::Module
StringRef Module
Definition: WasmYAML.h:207
llvm::WasmYAML::Relocation
Definition: WasmYAML.h:114
llvm::WasmYAML::TagSection::TagTypes
std::vector< uint32_t > TagTypes
Definition: WasmYAML.h:343
llvm::WasmYAML::LinkingSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:250
llvm::WasmYAML::Import::TagIndex
uint32_t TagIndex
Definition: WasmYAML.h:98
llvm::Init
Definition: Record.h:281
llvm::WasmYAML::Object
Definition: WasmYAML.h:416
llvm::PointerUnion< const Value *, const PseudoSourceValue * >
llvm::WasmYAML::Comdat::Entries
std::vector< ComdatEntry > Entries
Definition: WasmYAML.h:183
llvm::WasmYAML::ExportSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:359
llvm::WasmYAML::DataCountSection
Definition: WasmYAML.h:406
llvm::WasmYAML::DataSegment::InitFlags
uint32_t InitFlags
Definition: WasmYAML.h:125
llvm::WasmYAML::ExportSection::ExportSection
ExportSection()
Definition: WasmYAML.h:357
llvm::WasmYAML::InitExpr::InitExpr
InitExpr()
Definition: WasmYAML.h:66
llvm::WasmYAML::TagSection
Definition: WasmYAML.h:336
llvm::WasmYAML::TypeSection::TypeSection
TypeSection()
Definition: WasmYAML.h:287
std
Definition: BitVector.h:851
llvm::WasmYAML::Import::Memory
Limits Memory
Definition: WasmYAML.h:97
llvm::WasmYAML::DataSegment
Definition: WasmYAML.h:123
llvm::WasmYAML::ProducersSection::Languages
std::vector< ProducerEntry > Languages
Definition: WasmYAML.h:270
llvm::WasmYAML::Section::Section
Section(SectionType SecType)
Definition: WasmYAML.h:187
llvm::WasmYAML::DataSegment::MemoryIndex
uint32_t MemoryIndex
Definition: WasmYAML.h:126
llvm::WasmYAML::Limits::Flags
LimitFlags Flags
Definition: WasmYAML.h:48
llvm::WasmYAML::SegmentInfo::Alignment
uint32_t Alignment
Definition: WasmYAML.h:149
llvm::WasmYAML::DataCountSection::Count
uint32_t Count
Definition: WasmYAML.h:413
llvm::wasm::WASM_SEC_CODE
@ WASM_SEC_CODE
Definition: Wasm.h:252
llvm::WasmYAML::DataSection::Segments
std::vector< DataSegment > Segments
Definition: WasmYAML.h:403
Casting.h
llvm::WasmYAML::LinkingSection
Definition: WasmYAML.h:247
llvm::sampleprof::SecType
SecType
Definition: SampleProf.h:120
llvm::WasmYAML::Global
Definition: WasmYAML.h:82
llvm::WasmYAML::MemorySection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:329
llvm::WasmYAML::TableSection::TableSection
TableSection()
Definition: WasmYAML.h:317
Wasm.h
llvm::WasmYAML::InitExpr::Extended
bool Extended
Definition: WasmYAML.h:67
llvm::WasmYAML::LinkingSection::InitFunctions
std::vector< InitFunction > InitFunctions
Definition: WasmYAML.h:258
llvm::WasmYAML::NameEntry::Name
StringRef Name
Definition: WasmYAML.h:133
llvm::WasmYAML::Limits::Minimum
yaml::Hex32 Minimum
Definition: WasmYAML.h:49
llvm::WasmYAML::NameSection::FunctionNames
std::vector< NameEntry > FunctionNames
Definition: WasmYAML.h:242
llvm::WasmYAML::SymbolInfo::DataRef
wasm::WasmDataReference DataRef
Definition: WasmYAML.h:167
llvm::WasmYAML::Export
Definition: WasmYAML.h:59
llvm::WasmYAML::TypeSection
Definition: WasmYAML.h:286
llvm::WasmYAML::NameSection::DataSegmentNames
std::vector< NameEntry > DataSegmentNames
Definition: WasmYAML.h:244
llvm::WasmYAML::TargetFeaturesSection::TargetFeaturesSection
TargetFeaturesSection()
Definition: WasmYAML.h:276
llvm::WasmYAML::Signature::ParamTypes
std::vector< ValueType > ParamTypes
Definition: WasmYAML.h:156
llvm::WasmYAML::MemorySection::Memories
std::vector< Limits > Memories
Definition: WasmYAML.h:333
llvm::WasmYAML::Import::Kind
ExportKind Kind
Definition: WasmYAML.h:93
llvm::WasmYAML::ElemSegment::Offset
InitExpr Offset
Definition: WasmYAML.h:78
llvm::WasmYAML::ElemSegment::ElemKind
ValueType ElemKind
Definition: WasmYAML.h:77
llvm::WasmYAML::Function::Body
yaml::BinaryRef Body
Definition: WasmYAML.h:111
llvm::WasmYAML::NameSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:237
llvm::wasm::WASM_SEC_TYPE
@ WASM_SEC_TYPE
Definition: Wasm.h:243
llvm::WasmYAML::LocalDecl::Type
ValueType Type
Definition: WasmYAML.h:104
llvm::WasmYAML::DataSegment::SectionOffset
uint32_t SectionOffset
Definition: WasmYAML.h:124
llvm::WasmYAML::Export::Index
uint32_t Index
Definition: WasmYAML.h:62
llvm::WasmYAML::ImportSection
Definition: WasmYAML.h:296
llvm::WasmYAML::ProducersSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:265
llvm::Value
LLVM Value Representation.
Definition: Value.h:74
llvm::WasmYAML::ElemSection::Segments
std::vector< ElemSegment > Segments
Definition: WasmYAML.h:383
llvm::WasmYAML::ImportSection::Imports
std::vector< Import > Imports
Definition: WasmYAML.h:303
llvm::MachO::SectionType
SectionType
These are the section type and attributes fields.
Definition: MachO.h:120
llvm::WasmYAML::DataCountSection::DataCountSection
DataCountSection()
Definition: WasmYAML.h:407
llvm::WasmYAML::SymbolInfo::ElementIndex
uint32_t ElementIndex
Definition: WasmYAML.h:166
llvm::WasmYAML::DylinkImportInfo::Flags
SymbolFlags Flags
Definition: WasmYAML.h:209
llvm::WasmYAML::Import::Import
Import()
Definition: WasmYAML.h:90
llvm::WasmYAML::FunctionSection::FunctionSection
FunctionSection()
Definition: WasmYAML.h:307