LLVM 24.0.0git
ELFYAML.h
Go to the documentation of this file.
1//===- ELFYAML.h - ELF 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 ELF.
12///
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_OBJECTYAML_ELFYAML_H
16#define LLVM_OBJECTYAML_ELFYAML_H
17
18#include "llvm/ADT/StringRef.h"
25#include <cstdint>
26#include <memory>
27#include <optional>
28#include <vector>
29
30namespace llvm {
31namespace ELFYAML {
32
34LLVM_ABI std::string appendUniqueSuffix(StringRef Name, const Twine &Msg);
35
36// These types are invariant across 32/64-bit ELF, so for simplicity just
37// directly give them their exact sizes. We don't need to worry about
38// endianness because these are just the types in the YAMLIO structures,
39// and are appropriately converted to the necessary endianness when
40// reading/generating binary object files.
41// The naming of these types is intended to be ELF_PREFIX, where PREFIX is
42// the common prefix of the respective constants. E.g. ELF_EM corresponds
43// to the `e_machine` constants, like `EM_X86_64`.
44// In the future, these would probably be better suited by C++11 enum
45// class's with appropriate fixed underlying type.
52// Just use 64, since it can hold 32-bit values too.
54// Just use 64, since it can hold 32-bit values too.
60// Just use 64, since it can hold 32-bit values too.
66
71LLVM_YAML_STRONG_TYPEDEF(uint32_t, MIPS_AFL_FLAGS1)
73
75LLVM_YAML_STRONG_TYPEDEF(int64_t, YAMLIntUInt)
76
77template <class ELFT>
78unsigned getDefaultShEntSize(unsigned EMachine, ELF_SHT SecType,
79 StringRef SecName) {
80 if (EMachine == ELF::EM_MIPS && SecType == ELF::SHT_MIPS_ABIFLAGS)
82
83 switch (SecType) {
84 case ELF::SHT_SYMTAB:
85 case ELF::SHT_DYNSYM:
86 return sizeof(typename ELFT::Sym);
87 case ELF::SHT_GROUP:
88 return sizeof(typename ELFT::Word);
89 case ELF::SHT_REL:
90 return sizeof(typename ELFT::Rel);
91 case ELF::SHT_RELA:
92 return sizeof(typename ELFT::Rela);
93 case ELF::SHT_RELR:
94 return sizeof(typename ELFT::Relr);
96 return sizeof(typename ELFT::Dyn);
97 case ELF::SHT_HASH:
98 return sizeof(typename ELFT::Word);
100 return sizeof(typename ELFT::Word);
102 return sizeof(typename ELFT::Half);
105 default:
106 if (SecName == ".debug_str")
107 return 1;
108 return 0;
109 }
110}
111
112// For now, hardcode 64 bits everywhere that 32 or 64 would be needed
113// since 64-bit can hold 32-bit values too.
115 ELF_ELFCLASS Class;
116 ELF_ELFDATA Data;
117 ELF_ELFOSABI OSABI;
118 llvm::yaml::Hex8 ABIVersion;
119 ELF_ET Type;
120 std::optional<ELF_EM> Machine;
121 std::optional<ELF_EF> Flags;
122 llvm::yaml::Hex64 Entry;
123 std::optional<StringRef> SectionHeaderStringTable;
124
125 std::optional<llvm::yaml::Hex64> EPhOff;
126 std::optional<llvm::yaml::Hex16> EPhEntSize;
127 std::optional<llvm::yaml::Hex16> EPhNum;
128 std::optional<llvm::yaml::Hex16> EShEntSize;
129 std::optional<llvm::yaml::Hex64> EShOff;
130 std::optional<llvm::yaml::Hex16> EShNum;
131 std::optional<llvm::yaml::Hex16> EShStrNdx;
132};
133
137
138struct Symbol {
140 ELF_STT Type;
141 std::optional<StringRef> Section;
142 std::optional<ELF_SHN> Index;
143 ELF_STB Binding;
144 std::optional<llvm::yaml::Hex64> Value;
145 std::optional<llvm::yaml::Hex64> Size;
146 std::optional<uint8_t> Other;
147
148 std::optional<uint32_t> StName;
149};
150
154
156 ELF_DYNTAG Tag;
157 llvm::yaml::Hex64 Val;
158};
159
161 llvm::yaml::Hex64 Address;
162 llvm::yaml::Hex64 Size;
163};
164
170
201
204 std::optional<llvm::yaml::Hex64> Offset;
205
206 // Usually chunks are not created implicitly, but rather loaded from YAML.
207 // This flag is used to signal whether this is the case or not.
209
211 virtual ~Chunk();
212};
213
214struct Section : public Chunk {
215 ELF_SHT Type;
216 std::optional<ELF_SHF> Flags;
217 std::optional<llvm::yaml::Hex64> Address;
218 std::optional<StringRef> Link;
219 llvm::yaml::Hex64 AddressAlign;
220 std::optional<llvm::yaml::Hex64> EntSize;
221
222 std::optional<yaml::BinaryRef> Content;
223 std::optional<llvm::yaml::Hex64> Size;
224
225 // Holds the original section index.
227
229
230 static bool classof(const Chunk *S) {
232 }
233
234 // Some derived sections might have their own special entries. This method
235 // returns a vector of <entry name, is used> pairs. It is used for section
236 // validation.
237 virtual std::vector<std::pair<StringRef, bool>> getEntries() const {
238 return {};
239 };
240
241 // The following members are used to override section fields which is
242 // useful for creating invalid objects.
243
244 // This can be used to override the sh_addralign field.
245 std::optional<llvm::yaml::Hex64> ShAddrAlign;
246
247 // This can be used to override the offset stored in the sh_name field.
248 // It does not affect the name stored in the string table.
249 std::optional<llvm::yaml::Hex64> ShName;
250
251 // This can be used to override the sh_offset field. It does not place the
252 // section data at the offset specified.
253 std::optional<llvm::yaml::Hex64> ShOffset;
254
255 // This can be used to override the sh_size field. It does not affect the
256 // content written.
257 std::optional<llvm::yaml::Hex64> ShSize;
258
259 // This can be used to override the sh_flags field.
260 std::optional<llvm::yaml::Hex64> ShFlags;
261
262 // This can be used to override the sh_type field. It is useful when we
263 // want to use specific YAML keys for a section of a particular type to
264 // describe the content, but still want to have a different final type
265 // for the section.
266 std::optional<ELF_SHT> ShType;
267};
268
269// Fill is a block of data which is placed outside of sections. It is
270// not present in the sections header table, but it might affect the output file
271// size and program headers produced.
272struct Fill : Chunk {
273 std::optional<yaml::BinaryRef> Pattern;
274 llvm::yaml::Hex64 Size;
275
276 Fill() : Chunk(ChunkKind::Fill, /*Implicit=*/false) {}
277
278 static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Fill; }
279};
280
284
285 static bool classof(const Chunk *S) {
287 }
288
289 std::optional<std::vector<SectionHeader>> Sections;
290 std::optional<std::vector<SectionHeader>> Excluded;
291 std::optional<bool> NoHeaders;
292
293 size_t getNumHeaders(size_t SectionsNum) const {
294 if (IsImplicit || isDefault())
295 return SectionsNum;
296 if (NoHeaders)
297 return (*NoHeaders) ? 0 : SectionsNum;
298 return (Sections ? Sections->size() : 0) + /*Null section*/ 1;
299 }
300
301 bool isDefault() const { return !Sections && !Excluded && !NoHeaders; }
302
303 static constexpr StringRef TypeStr = "SectionHeaderTable";
304};
305
306// Places the program header table at its position in the list of sections.
310
311 static bool classof(const Chunk *S) {
313 }
314
315 static constexpr StringRef TypeStr = "ProgramHeaderTable";
316};
317
319 std::optional<std::vector<BBAddrMapYAML::BBAddrMapEntry>> Entries;
320 std::optional<std::vector<BBAddrMapYAML::PGOAnalysisMapEntry>> PGOAnalyses;
321
323
324 std::vector<std::pair<StringRef, bool>> getEntries() const override {
325 return {{"Entries", Entries.has_value()}};
326 };
327
328 static bool classof(const Chunk *S) {
329 return S->Kind == ChunkKind::BBAddrMap;
330 }
331};
332
334 std::optional<std::vector<StackSizeEntry>> Entries;
335
337
338 std::vector<std::pair<StringRef, bool>> getEntries() const override {
339 return {{"Entries", Entries.has_value()}};
340 };
341
342 static bool classof(const Chunk *S) {
343 return S->Kind == ChunkKind::StackSizes;
344 }
345
347 return Name == ".stack_sizes";
348 }
349};
350
352 std::optional<std::vector<DynamicEntry>> Entries;
353
355
356 std::vector<std::pair<StringRef, bool>> getEntries() const override {
357 return {{"Entries", Entries.has_value()}};
358 };
359
360 static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Dynamic; }
361};
362
364 std::optional<llvm::yaml::Hex64> Info;
365
367
368 static bool classof(const Chunk *S) {
369 return S->Kind == ChunkKind::RawContent;
370 }
371
372 // Is used when a content is read as an array of bytes.
373 std::optional<std::vector<uint8_t>> ContentBuf;
374};
375
378
379 static bool classof(const Chunk *S) { return S->Kind == ChunkKind::NoBits; }
380};
381
383 std::optional<std::vector<ELFYAML::NoteEntry>> Notes;
384
386
387 std::vector<std::pair<StringRef, bool>> getEntries() const override {
388 return {{"Notes", Notes.has_value()}};
389 };
390
391 static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Note; }
392};
393
395 std::optional<std::vector<uint32_t>> Bucket;
396 std::optional<std::vector<uint32_t>> Chain;
397
398 std::vector<std::pair<StringRef, bool>> getEntries() const override {
399 return {{"Bucket", Bucket.has_value()}, {"Chain", Chain.has_value()}};
400 };
401
402 // The following members are used to override section fields.
403 // This is useful for creating invalid objects.
404 std::optional<llvm::yaml::Hex64> NBucket;
405 std::optional<llvm::yaml::Hex64> NChain;
406
408
409 static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Hash; }
410};
411
413 // The number of hash buckets.
414 // Not used when dumping the object, but can be used to override
415 // the real number of buckets when emiting an object from a YAML document.
416 std::optional<llvm::yaml::Hex32> NBuckets;
417
418 // Index of the first symbol in the dynamic symbol table
419 // included in the hash table.
420 llvm::yaml::Hex32 SymNdx;
421
422 // The number of words in the Bloom filter.
423 // Not used when dumping the object, but can be used to override the real
424 // number of words in the Bloom filter when emiting an object from a YAML
425 // document.
426 std::optional<llvm::yaml::Hex32> MaskWords;
427
428 // A shift constant used by the Bloom filter.
429 llvm::yaml::Hex32 Shift2;
430};
431
433 std::optional<GnuHashHeader> Header;
434 std::optional<std::vector<llvm::yaml::Hex64>> BloomFilter;
435 std::optional<std::vector<llvm::yaml::Hex32>> HashBuckets;
436 std::optional<std::vector<llvm::yaml::Hex32>> HashValues;
437
439
440 std::vector<std::pair<StringRef, bool>> getEntries() const override {
441 return {{"Header", Header.has_value()},
442 {"BloomFilter", BloomFilter.has_value()},
443 {"HashBuckets", HashBuckets.has_value()},
444 {"HashValues", HashValues.has_value()}};
445 };
446
447 static bool classof(const Chunk *S) { return S->Kind == ChunkKind::GnuHash; }
448};
449
456
460 std::vector<VernauxEntry> AuxV;
461};
462
464 std::optional<std::vector<VerneedEntry>> VerneedV;
465 std::optional<llvm::yaml::Hex64> Info;
466
468
469 std::vector<std::pair<StringRef, bool>> getEntries() const override {
470 return {{"Dependencies", VerneedV.has_value()}};
471 };
472
473 static bool classof(const Chunk *S) {
474 return S->Kind == ChunkKind::Verneed;
475 }
476};
477
479 std::optional<std::vector<YAMLFlowString>> Symbols;
480
482
483 std::vector<std::pair<StringRef, bool>> getEntries() const override {
484 return {{"Symbols", Symbols.has_value()}};
485 };
486
487 static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Addrsig; }
488};
489
494
496 std::optional<std::vector<LinkerOption>> Options;
497
499
500 std::vector<std::pair<StringRef, bool>> getEntries() const override {
501 return {{"Options", Options.has_value()}};
502 };
503
504 static bool classof(const Chunk *S) {
505 return S->Kind == ChunkKind::LinkerOptions;
506 }
507};
508
510 std::optional<std::vector<YAMLFlowString>> Libs;
511
513
514 std::vector<std::pair<StringRef, bool>> getEntries() const override {
515 return {{"Libraries", Libs.has_value()}};
516 };
517
518 static bool classof(const Chunk *S) {
520 }
521};
522
523// Represents the call graph profile section entry.
525 // The weight of the edge.
527};
528
530 std::optional<std::vector<CallGraphEntryWeight>> Entries;
531
533
534 std::vector<std::pair<StringRef, bool>> getEntries() const override {
535 return {{"Entries", Entries.has_value()}};
536 };
537
538 static bool classof(const Chunk *S) {
540 }
541};
542
544 std::optional<std::vector<uint16_t>> Entries;
545
547
548 std::vector<std::pair<StringRef, bool>> getEntries() const override {
549 return {{"Entries", Entries.has_value()}};
550 };
551
552 static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Symver; }
553};
554
556 std::optional<uint16_t> Version;
557 std::optional<uint16_t> Flags;
558 std::optional<uint16_t> VersionNdx;
559 std::optional<uint32_t> Hash;
560 std::optional<uint16_t> VDAux;
561 std::vector<StringRef> VerNames;
562};
563
565 std::optional<std::vector<VerdefEntry>> Entries;
566 std::optional<llvm::yaml::Hex64> Info;
567
569
570 std::vector<std::pair<StringRef, bool>> getEntries() const override {
571 return {{"Entries", Entries.has_value()}};
572 };
573
574 static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Verdef; }
575};
576
578 // Members of a group contain a flag and a list of section indices
579 // that are part of the group.
580 std::optional<std::vector<SectionOrType>> Members;
581 std::optional<StringRef> Signature; /* Info */
582
584
585 std::vector<std::pair<StringRef, bool>> getEntries() const override {
586 return {{"Members", Members.has_value()}};
587 };
588
589 static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Group; }
590};
591
593 llvm::yaml::Hex64 Offset;
594 YAMLIntUInt Addend;
595 ELF_REL Type;
596 std::optional<StringRef> Symbol;
597};
598
600 std::optional<std::vector<Relocation>> Relocations;
602
604
605 std::vector<std::pair<StringRef, bool>> getEntries() const override {
606 return {{"Relocations", Relocations.has_value()}};
607 };
608
609 static bool classof(const Chunk *S) {
610 return S->Kind == ChunkKind::Relocation;
611 }
612};
613
615 std::optional<std::vector<llvm::yaml::Hex64>> Entries;
616
618
619 std::vector<std::pair<StringRef, bool>> getEntries() const override {
620 return {{"Entries", Entries.has_value()}};
621 };
622
623 static bool classof(const Chunk *S) {
624 return S->Kind == ChunkKind::Relr;
625 }
626};
627
629 std::optional<std::vector<uint32_t>> Entries;
630
632
633 std::vector<std::pair<StringRef, bool>> getEntries() const override {
634 return {{"Entries", Entries.has_value()}};
635 };
636
637 static bool classof(const Chunk *S) {
639 }
640};
641
643 llvm::yaml::Hex32 Offset;
644 llvm::yaml::Hex32 Value;
645};
646
648 std::optional<std::vector<ARMIndexTableEntry>> Entries;
649
651
652 std::vector<std::pair<StringRef, bool>> getEntries() const override {
653 return {{"Entries", Entries.has_value()}};
654 };
655
656 static bool classof(const Chunk *S) {
657 return S->Kind == ChunkKind::ARMIndexTable;
658 }
659};
660
661// Represents .MIPS.abiflags section
663 llvm::yaml::Hex16 Version;
664 MIPS_ISA ISALevel;
665 llvm::yaml::Hex8 ISARevision;
666 MIPS_AFL_REG GPRSize;
667 MIPS_AFL_REG CPR1Size;
668 MIPS_AFL_REG CPR2Size;
669 MIPS_ABI_FP FpABI;
670 MIPS_AFL_EXT ISAExtension;
671 MIPS_AFL_ASE ASEs;
672 MIPS_AFL_FLAGS1 Flags1;
673 llvm::yaml::Hex32 Flags2;
674
676
677 static bool classof(const Chunk *S) {
678 return S->Kind == ChunkKind::MipsABIFlags;
679 }
680};
681
683 ELF_PT Type;
684 ELF_PF Flags;
685 llvm::yaml::Hex64 VAddr;
686 llvm::yaml::Hex64 PAddr;
687 std::optional<llvm::yaml::Hex64> Align;
688 std::optional<llvm::yaml::Hex64> FileSize;
689 std::optional<llvm::yaml::Hex64> MemSize;
690 std::optional<llvm::yaml::Hex64> Offset;
691 std::optional<StringRef> FirstSec;
692 std::optional<StringRef> LastSec;
693
694 // This vector contains all chunks from [FirstSec, LastSec].
695 std::vector<Chunk *> Chunks;
696};
697
698struct Object {
700 std::vector<ProgramHeader> ProgramHeaders;
701
702 // An object might contain output section descriptions as well as
703 // custom data that does not belong to any section.
704 std::vector<std::unique_ptr<Chunk>> Chunks;
705
706 // Although in reality the symbols reside in a section, it is a lot
707 // cleaner and nicer if we read them from the YAML as a separate
708 // top-level key, which automatically ensures that invariants like there
709 // being a single SHT_SYMTAB section are upheld.
710 std::optional<std::vector<Symbol>> Symbols;
711 std::optional<std::vector<Symbol>> DynamicSymbols;
712 std::optional<DWARFYAML::Data> DWARF;
713
714 std::vector<Section *> getSections() {
715 std::vector<Section *> Ret;
716 for (const std::unique_ptr<Chunk> &Sec : Chunks)
717 if (auto S = dyn_cast<ELFYAML::Section>(Sec.get()))
718 Ret.push_back(S);
719 return Ret;
720 }
721
723 for (const std::unique_ptr<Chunk> &C : Chunks)
724 if (auto *S = dyn_cast<ELFYAML::SectionHeaderTable>(C.get()))
725 return *S;
726 llvm_unreachable("the section header table chunk must always be present");
727 }
728
730 for (const std::unique_ptr<Chunk> &C : Chunks)
731 if (auto *P = dyn_cast<ELFYAML::ProgramHeaderTable>(C.get()))
732 return P;
733 return nullptr;
734 }
735
736 LLVM_ABI ELF_ELFOSABI getOSAbi() const;
737 LLVM_ABI unsigned getMachine() const;
738};
739
741 const NoBitsSection &S);
742
743} // end namespace ELFYAML
744} // end namespace llvm
745
753LLVM_YAML_IS_SEQUENCE_VECTOR(std::unique_ptr<llvm::ELFYAML::Chunk>)
761
762namespace llvm {
763namespace yaml {
764
765template <> struct ScalarTraits<ELFYAML::YAMLIntUInt> {
766 LLVM_ABI static void output(const ELFYAML::YAMLIntUInt &Val, void *Ctx,
767 raw_ostream &Out);
768 LLVM_ABI static StringRef input(StringRef Scalar, void *Ctx,
769 ELFYAML::YAMLIntUInt &Val);
771};
772
773template <>
775 LLVM_ABI static void enumeration(IO &IO, ELFYAML::ELF_ET &Value);
776};
777
778template <> struct ScalarEnumerationTraits<ELFYAML::ELF_PT> {
779 LLVM_ABI static void enumeration(IO &IO, ELFYAML::ELF_PT &Value);
780};
781
782template <> struct ScalarEnumerationTraits<ELFYAML::ELF_NT> {
783 LLVM_ABI static void enumeration(IO &IO, ELFYAML::ELF_NT &Value);
784};
785
786template <>
788 LLVM_ABI static void enumeration(IO &IO, ELFYAML::ELF_EM &Value);
789};
790
791template <>
792struct ScalarEnumerationTraits<ELFYAML::ELF_ELFCLASS> {
793 LLVM_ABI static void enumeration(IO &IO, ELFYAML::ELF_ELFCLASS &Value);
794};
795
796template <>
797struct ScalarEnumerationTraits<ELFYAML::ELF_ELFDATA> {
798 LLVM_ABI static void enumeration(IO &IO, ELFYAML::ELF_ELFDATA &Value);
799};
800
801template <>
802struct ScalarEnumerationTraits<ELFYAML::ELF_ELFOSABI> {
803 LLVM_ABI static void enumeration(IO &IO, ELFYAML::ELF_ELFOSABI &Value);
804};
805
806template <>
808 LLVM_ABI static void bitset(IO &IO, ELFYAML::ELF_EF &Value);
809};
810
811template <> struct ScalarBitSetTraits<ELFYAML::ELF_PF> {
812 LLVM_ABI static void bitset(IO &IO, ELFYAML::ELF_PF &Value);
813};
814
815template <>
817 LLVM_ABI static void enumeration(IO &IO, ELFYAML::ELF_SHT &Value);
818};
819
820template <>
821struct ScalarBitSetTraits<ELFYAML::ELF_SHF> {
822 LLVM_ABI static void bitset(IO &IO, ELFYAML::ELF_SHF &Value);
823};
824
825template <> struct ScalarEnumerationTraits<ELFYAML::ELF_SHN> {
826 LLVM_ABI static void enumeration(IO &IO, ELFYAML::ELF_SHN &Value);
827};
828
829template <> struct ScalarEnumerationTraits<ELFYAML::ELF_STB> {
830 LLVM_ABI static void enumeration(IO &IO, ELFYAML::ELF_STB &Value);
831};
832
833template <>
835 LLVM_ABI static void enumeration(IO &IO, ELFYAML::ELF_STT &Value);
836};
837
838template <>
840 LLVM_ABI static void enumeration(IO &IO, ELFYAML::ELF_REL &Value);
841};
842
843template <>
844struct ScalarEnumerationTraits<ELFYAML::ELF_DYNTAG> {
845 LLVM_ABI static void enumeration(IO &IO, ELFYAML::ELF_DYNTAG &Value);
846};
847
848template <>
850 LLVM_ABI static void enumeration(IO &IO, ELFYAML::ELF_RSS &Value);
851};
852
853template <>
854struct ScalarEnumerationTraits<ELFYAML::MIPS_AFL_REG> {
855 LLVM_ABI static void enumeration(IO &IO, ELFYAML::MIPS_AFL_REG &Value);
856};
857
858template <>
859struct ScalarEnumerationTraits<ELFYAML::MIPS_ABI_FP> {
860 LLVM_ABI static void enumeration(IO &IO, ELFYAML::MIPS_ABI_FP &Value);
861};
862
863template <>
864struct ScalarEnumerationTraits<ELFYAML::MIPS_AFL_EXT> {
865 LLVM_ABI static void enumeration(IO &IO, ELFYAML::MIPS_AFL_EXT &Value);
866};
867
868template <>
870 LLVM_ABI static void enumeration(IO &IO, ELFYAML::MIPS_ISA &Value);
871};
872
873template <>
874struct ScalarBitSetTraits<ELFYAML::MIPS_AFL_ASE> {
875 LLVM_ABI static void bitset(IO &IO, ELFYAML::MIPS_AFL_ASE &Value);
876};
877
878template <>
879struct ScalarBitSetTraits<ELFYAML::MIPS_AFL_FLAGS1> {
880 LLVM_ABI static void bitset(IO &IO, ELFYAML::MIPS_AFL_FLAGS1 &Value);
881};
882
883template <>
884struct MappingTraits<ELFYAML::FileHeader> {
885 LLVM_ABI static void mapping(IO &IO, ELFYAML::FileHeader &FileHdr);
886};
887
888template <> struct MappingTraits<ELFYAML::SectionHeader> {
889 LLVM_ABI static void mapping(IO &IO, ELFYAML::SectionHeader &SHdr);
890};
891
892template <> struct MappingTraits<ELFYAML::ProgramHeader> {
893 LLVM_ABI static void mapping(IO &IO, ELFYAML::ProgramHeader &FileHdr);
894 LLVM_ABI static std::string validate(IO &IO, ELFYAML::ProgramHeader &FileHdr);
895};
896
897template <>
898struct MappingTraits<ELFYAML::Symbol> {
899 LLVM_ABI static void mapping(IO &IO, ELFYAML::Symbol &Symbol);
900 LLVM_ABI static std::string validate(IO &IO, ELFYAML::Symbol &Symbol);
901};
902
903template <> struct MappingTraits<ELFYAML::StackSizeEntry> {
904 LLVM_ABI static void mapping(IO &IO, ELFYAML::StackSizeEntry &Rel);
905};
906
907template <> struct MappingTraits<ELFYAML::GnuHashHeader> {
908 LLVM_ABI static void mapping(IO &IO, ELFYAML::GnuHashHeader &Rel);
909};
910
911template <> struct MappingTraits<ELFYAML::DynamicEntry> {
912 LLVM_ABI static void mapping(IO &IO, ELFYAML::DynamicEntry &Rel);
913};
914
915template <> struct MappingTraits<ELFYAML::NoteEntry> {
916 LLVM_ABI static void mapping(IO &IO, ELFYAML::NoteEntry &N);
917};
918
919template <> struct MappingTraits<ELFYAML::VerdefEntry> {
920 LLVM_ABI static void mapping(IO &IO, ELFYAML::VerdefEntry &E);
921};
922
923template <> struct MappingTraits<ELFYAML::VerneedEntry> {
925};
926
927template <> struct MappingTraits<ELFYAML::VernauxEntry> {
929};
930
931template <> struct MappingTraits<ELFYAML::LinkerOption> {
932 LLVM_ABI static void mapping(IO &IO, ELFYAML::LinkerOption &Sym);
933};
934
935template <> struct MappingTraits<ELFYAML::CallGraphEntryWeight> {
937};
938
939template <> struct MappingTraits<ELFYAML::Relocation> {
940 LLVM_ABI static void mapping(IO &IO, ELFYAML::Relocation &Rel);
941};
942
943template <> struct MappingTraits<ELFYAML::ARMIndexTableEntry> {
945};
946
947template <> struct MappingTraits<std::unique_ptr<ELFYAML::Chunk>> {
948 LLVM_ABI static void mapping(IO &IO, std::unique_ptr<ELFYAML::Chunk> &C);
949 LLVM_ABI static std::string validate(IO &io,
950 std::unique_ptr<ELFYAML::Chunk> &C);
951};
952
953template <>
954struct MappingTraits<ELFYAML::Object> {
955 LLVM_ABI static void mapping(IO &IO, ELFYAML::Object &Object);
956};
957
958template <> struct MappingTraits<ELFYAML::SectionOrType> {
959 LLVM_ABI static void mapping(IO &IO, ELFYAML::SectionOrType &sectionOrType);
960};
961
962} // end namespace yaml
963} // end namespace llvm
964
965#endif // LLVM_OBJECTYAML_ELFYAML_H
uint64_t uint64_t
This file declares the YAML representation of BB address maps (SHT_LLVM_BB_ADDR_MAP / ....
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
#define LLVM_ABI
Definition Compiler.h:211
This file declares classes for handling the YAML representation of DWARF Debug Info.
#define P(N)
const char * Msg
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
Utility for declaring that a std::vector of a particular type should be considered a YAML sequence.
#define LLVM_YAML_STRONG_TYPEDEF(_base, _type)
YAML I/O does conversion based on types. But often native data types are just a typedef of built in i...
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition ArrayRef.h:40
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition Twine.h:82
LLVM Value Representation.
Definition Value.h:75
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
Specialized YAMLIO scalar type for representing a binary blob.
Definition YAML.h:64
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
LLVM_ABI std::string appendUniqueSuffix(StringRef Name, const Twine &Msg)
unsigned getDefaultShEntSize(unsigned EMachine, ELF_SHT SecType, StringRef SecName)
Definition ELFYAML.h:78
LLVM_ABI StringRef dropUniqueSuffix(StringRef S)
LLVM_ABI bool shouldAllocateFileSpace(ArrayRef< ProgramHeader > Phdrs, const NoBitsSection &S)
@ SHT_GROUP
Definition ELF.h:1010
@ SHT_REL
Definition ELF.h:1004
@ SHT_LLVM_CALL_GRAPH_PROFILE
Definition ELF.h:1033
@ SHT_SYMTAB
Definition ELF.h:997
@ SHT_RELR
Definition ELF.h:1014
@ SHT_DYNAMIC
Definition ELF.h:1001
@ SHT_SYMTAB_SHNDX
Definition ELF.h:1011
@ SHT_RELA
Definition ELF.h:999
@ SHT_DYNSYM
Definition ELF.h:1006
@ SHT_MIPS_ABIFLAGS
Definition ELF.h:1077
@ SHT_GNU_versym
Definition ELF.h:1049
@ SHT_HASH
Definition ELF.h:1000
QuotingType
Describe which type of quotes should be used when quoting is necessary.
Definition YAMLTraits.h:132
This is an optimization pass for GlobalISel generic memory operations.
@ Implicit
Not emitted register (e.g. carry, or temporary result).
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
Definition Casting.h:643
Implement std::hash so that hash_code can be used in STL containers.
Definition BitVector.h:879
#define N
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition ELFYAML.h:652
static bool classof(const Chunk *S)
Definition ELFYAML.h:656
std::optional< std::vector< ARMIndexTableEntry > > Entries
Definition ELFYAML.h:648
std::optional< std::vector< YAMLFlowString > > Symbols
Definition ELFYAML.h:479
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition ELFYAML.h:483
static bool classof(const Chunk *S)
Definition ELFYAML.h:487
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition ELFYAML.h:324
std::optional< std::vector< BBAddrMapYAML::PGOAnalysisMapEntry > > PGOAnalyses
Definition ELFYAML.h:320
static bool classof(const Chunk *S)
Definition ELFYAML.h:328
std::optional< std::vector< BBAddrMapYAML::BBAddrMapEntry > > Entries
Definition ELFYAML.h:319
std::optional< std::vector< CallGraphEntryWeight > > Entries
Definition ELFYAML.h:530
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition ELFYAML.h:534
static bool classof(const Chunk *S)
Definition ELFYAML.h:538
Chunk(ChunkKind K, bool Implicit)
Definition ELFYAML.h:210
std::optional< llvm::yaml::Hex64 > Offset
Definition ELFYAML.h:204
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition ELFYAML.h:514
static bool classof(const Chunk *S)
Definition ELFYAML.h:518
std::optional< std::vector< YAMLFlowString > > Libs
Definition ELFYAML.h:510
llvm::yaml::Hex64 Val
Definition ELFYAML.h:157
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition ELFYAML.h:356
static bool classof(const Chunk *S)
Definition ELFYAML.h:360
std::optional< std::vector< DynamicEntry > > Entries
Definition ELFYAML.h:352
std::optional< llvm::yaml::Hex16 > EPhNum
Definition ELFYAML.h:127
std::optional< llvm::yaml::Hex64 > EShOff
Definition ELFYAML.h:129
std::optional< llvm::yaml::Hex64 > EPhOff
Definition ELFYAML.h:125
std::optional< llvm::yaml::Hex16 > EShEntSize
Definition ELFYAML.h:128
std::optional< llvm::yaml::Hex16 > EPhEntSize
Definition ELFYAML.h:126
llvm::yaml::Hex8 ABIVersion
Definition ELFYAML.h:118
std::optional< llvm::yaml::Hex16 > EShNum
Definition ELFYAML.h:130
llvm::yaml::Hex64 Entry
Definition ELFYAML.h:122
std::optional< ELF_EF > Flags
Definition ELFYAML.h:121
std::optional< ELF_EM > Machine
Definition ELFYAML.h:120
std::optional< StringRef > SectionHeaderStringTable
Definition ELFYAML.h:123
std::optional< llvm::yaml::Hex16 > EShStrNdx
Definition ELFYAML.h:131
llvm::yaml::Hex64 Size
Definition ELFYAML.h:274
std::optional< yaml::BinaryRef > Pattern
Definition ELFYAML.h:273
static bool classof(const Chunk *S)
Definition ELFYAML.h:278
std::optional< llvm::yaml::Hex32 > MaskWords
Definition ELFYAML.h:426
llvm::yaml::Hex32 SymNdx
Definition ELFYAML.h:420
llvm::yaml::Hex32 Shift2
Definition ELFYAML.h:429
std::optional< llvm::yaml::Hex32 > NBuckets
Definition ELFYAML.h:416
std::optional< std::vector< llvm::yaml::Hex64 > > BloomFilter
Definition ELFYAML.h:434
std::optional< std::vector< llvm::yaml::Hex32 > > HashBuckets
Definition ELFYAML.h:435
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition ELFYAML.h:440
static bool classof(const Chunk *S)
Definition ELFYAML.h:447
std::optional< GnuHashHeader > Header
Definition ELFYAML.h:433
std::optional< std::vector< llvm::yaml::Hex32 > > HashValues
Definition ELFYAML.h:436
static bool classof(const Chunk *S)
Definition ELFYAML.h:589
std::optional< std::vector< SectionOrType > > Members
Definition ELFYAML.h:580
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition ELFYAML.h:585
std::optional< StringRef > Signature
Definition ELFYAML.h:581
std::optional< std::vector< uint32_t > > Chain
Definition ELFYAML.h:396
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition ELFYAML.h:398
std::optional< llvm::yaml::Hex64 > NChain
Definition ELFYAML.h:405
static bool classof(const Chunk *S)
Definition ELFYAML.h:409
std::optional< std::vector< uint32_t > > Bucket
Definition ELFYAML.h:395
std::optional< llvm::yaml::Hex64 > NBucket
Definition ELFYAML.h:404
std::optional< std::vector< LinkerOption > > Options
Definition ELFYAML.h:496
static bool classof(const Chunk *S)
Definition ELFYAML.h:504
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition ELFYAML.h:500
llvm::yaml::Hex16 Version
Definition ELFYAML.h:663
static bool classof(const Chunk *S)
Definition ELFYAML.h:677
MIPS_AFL_FLAGS1 Flags1
Definition ELFYAML.h:672
llvm::yaml::Hex8 ISARevision
Definition ELFYAML.h:665
MIPS_AFL_EXT ISAExtension
Definition ELFYAML.h:670
llvm::yaml::Hex32 Flags2
Definition ELFYAML.h:673
static bool classof(const Chunk *S)
Definition ELFYAML.h:379
yaml::BinaryRef Desc
Definition ELFYAML.h:167
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition ELFYAML.h:387
std::optional< std::vector< ELFYAML::NoteEntry > > Notes
Definition ELFYAML.h:383
static bool classof(const Chunk *S)
Definition ELFYAML.h:391
std::optional< std::vector< Symbol > > DynamicSymbols
Definition ELFYAML.h:711
LLVM_ABI unsigned getMachine() const
Definition ELFYAML.cpp:35
std::optional< DWARFYAML::Data > DWARF
Definition ELFYAML.h:712
const SectionHeaderTable & getSectionHeaderTable() const
Definition ELFYAML.h:722
FileHeader Header
Definition ELFYAML.h:699
std::vector< std::unique_ptr< Chunk > > Chunks
Definition ELFYAML.h:704
LLVM_ABI ELF_ELFOSABI getOSAbi() const
Definition ELFYAML.cpp:33
std::vector< ProgramHeader > ProgramHeaders
Definition ELFYAML.h:700
std::optional< std::vector< Symbol > > Symbols
Definition ELFYAML.h:710
const ProgramHeaderTable * getProgramHeaderTable() const
Definition ELFYAML.h:729
std::vector< Section * > getSections()
Definition ELFYAML.h:714
static bool classof(const Chunk *S)
Definition ELFYAML.h:311
static constexpr StringRef TypeStr
Definition ELFYAML.h:315
std::optional< llvm::yaml::Hex64 > Align
Definition ELFYAML.h:687
llvm::yaml::Hex64 PAddr
Definition ELFYAML.h:686
std::optional< llvm::yaml::Hex64 > Offset
Definition ELFYAML.h:690
llvm::yaml::Hex64 VAddr
Definition ELFYAML.h:685
std::optional< llvm::yaml::Hex64 > MemSize
Definition ELFYAML.h:689
std::optional< StringRef > FirstSec
Definition ELFYAML.h:691
std::optional< StringRef > LastSec
Definition ELFYAML.h:692
std::optional< llvm::yaml::Hex64 > FileSize
Definition ELFYAML.h:688
std::vector< Chunk * > Chunks
Definition ELFYAML.h:695
static bool classof(const Chunk *S)
Definition ELFYAML.h:368
std::optional< llvm::yaml::Hex64 > Info
Definition ELFYAML.h:364
std::optional< std::vector< uint8_t > > ContentBuf
Definition ELFYAML.h:373
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition ELFYAML.h:605
std::optional< std::vector< Relocation > > Relocations
Definition ELFYAML.h:600
static bool classof(const Chunk *S)
Definition ELFYAML.h:609
std::optional< StringRef > Symbol
Definition ELFYAML.h:596
llvm::yaml::Hex64 Offset
Definition ELFYAML.h:593
static bool classof(const Chunk *S)
Definition ELFYAML.h:623
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition ELFYAML.h:619
std::optional< std::vector< llvm::yaml::Hex64 > > Entries
Definition ELFYAML.h:615
std::optional< std::vector< SectionHeader > > Excluded
Definition ELFYAML.h:290
static constexpr StringRef TypeStr
Definition ELFYAML.h:303
std::optional< bool > NoHeaders
Definition ELFYAML.h:291
static bool classof(const Chunk *S)
Definition ELFYAML.h:285
SectionHeaderTable(bool IsImplicit)
Definition ELFYAML.h:282
size_t getNumHeaders(size_t SectionsNum) const
Definition ELFYAML.h:293
std::optional< std::vector< SectionHeader > > Sections
Definition ELFYAML.h:289
std::optional< llvm::yaml::Hex64 > Address
Definition ELFYAML.h:217
std::optional< StringRef > Link
Definition ELFYAML.h:218
Section(ChunkKind Kind, bool IsImplicit=false)
Definition ELFYAML.h:228
std::optional< llvm::yaml::Hex64 > Size
Definition ELFYAML.h:223
static bool classof(const Chunk *S)
Definition ELFYAML.h:230
std::optional< llvm::yaml::Hex64 > ShAddrAlign
Definition ELFYAML.h:245
llvm::yaml::Hex64 AddressAlign
Definition ELFYAML.h:219
unsigned OriginalSecNdx
Definition ELFYAML.h:226
std::optional< ELF_SHF > Flags
Definition ELFYAML.h:216
std::optional< ELF_SHT > ShType
Definition ELFYAML.h:266
std::optional< llvm::yaml::Hex64 > ShOffset
Definition ELFYAML.h:253
virtual std::vector< std::pair< StringRef, bool > > getEntries() const
Definition ELFYAML.h:237
std::optional< llvm::yaml::Hex64 > ShFlags
Definition ELFYAML.h:260
std::optional< llvm::yaml::Hex64 > ShName
Definition ELFYAML.h:249
std::optional< yaml::BinaryRef > Content
Definition ELFYAML.h:222
std::optional< llvm::yaml::Hex64 > EntSize
Definition ELFYAML.h:220
std::optional< llvm::yaml::Hex64 > ShSize
Definition ELFYAML.h:257
llvm::yaml::Hex64 Size
Definition ELFYAML.h:162
llvm::yaml::Hex64 Address
Definition ELFYAML.h:161
static bool classof(const Chunk *S)
Definition ELFYAML.h:342
static bool nameMatches(StringRef Name)
Definition ELFYAML.h:346
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition ELFYAML.h:338
std::optional< std::vector< StackSizeEntry > > Entries
Definition ELFYAML.h:334
std::optional< ELF_SHN > Index
Definition ELFYAML.h:142
std::optional< StringRef > Section
Definition ELFYAML.h:141
std::optional< uint8_t > Other
Definition ELFYAML.h:146
std::optional< uint32_t > StName
Definition ELFYAML.h:148
std::optional< llvm::yaml::Hex64 > Value
Definition ELFYAML.h:144
std::optional< llvm::yaml::Hex64 > Size
Definition ELFYAML.h:145
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition ELFYAML.h:633
static bool classof(const Chunk *S)
Definition ELFYAML.h:637
std::optional< std::vector< uint32_t > > Entries
Definition ELFYAML.h:629
std::optional< std::vector< uint16_t > > Entries
Definition ELFYAML.h:544
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition ELFYAML.h:548
static bool classof(const Chunk *S)
Definition ELFYAML.h:552
std::optional< uint16_t > Flags
Definition ELFYAML.h:557
std::optional< uint16_t > VDAux
Definition ELFYAML.h:560
std::vector< StringRef > VerNames
Definition ELFYAML.h:561
std::optional< uint16_t > VersionNdx
Definition ELFYAML.h:558
std::optional< uint16_t > Version
Definition ELFYAML.h:556
std::optional< uint32_t > Hash
Definition ELFYAML.h:559
static bool classof(const Chunk *S)
Definition ELFYAML.h:574
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition ELFYAML.h:570
std::optional< llvm::yaml::Hex64 > Info
Definition ELFYAML.h:566
std::optional< std::vector< VerdefEntry > > Entries
Definition ELFYAML.h:565
std::vector< VernauxEntry > AuxV
Definition ELFYAML.h:460
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition ELFYAML.h:469
std::optional< llvm::yaml::Hex64 > Info
Definition ELFYAML.h:465
static bool classof(const Chunk *S)
Definition ELFYAML.h:473
std::optional< std::vector< VerneedEntry > > VerneedV
Definition ELFYAML.h:464
static LLVM_ABI void mapping(IO &IO, ELFYAML::ARMIndexTableEntry &E)
Definition ELFYAML.cpp:1765
static LLVM_ABI void mapping(IO &IO, ELFYAML::CallGraphEntryWeight &E)
Definition ELFYAML.cpp:1805
static LLVM_ABI void mapping(IO &IO, ELFYAML::DynamicEntry &Rel)
Definition ELFYAML.cpp:1696
static LLVM_ABI void mapping(IO &IO, ELFYAML::FileHeader &FileHdr)
Definition ELFYAML.cpp:961
static LLVM_ABI void mapping(IO &IO, ELFYAML::GnuHashHeader &Rel)
Definition ELFYAML.cpp:1687
static LLVM_ABI void mapping(IO &IO, ELFYAML::LinkerOption &Sym)
Definition ELFYAML.cpp:1798
static LLVM_ABI void mapping(IO &IO, ELFYAML::NoteEntry &N)
Definition ELFYAML.cpp:1704
static LLVM_ABI void mapping(IO &IO, ELFYAML::Object &Object)
Definition ELFYAML.cpp:1779
static LLVM_ABI std::string validate(IO &IO, ELFYAML::ProgramHeader &FileHdr)
Definition ELFYAML.cpp:999
static LLVM_ABI void mapping(IO &IO, ELFYAML::ProgramHeader &FileHdr)
Definition ELFYAML.cpp:985
static LLVM_ABI void mapping(IO &IO, ELFYAML::Relocation &Rel)
Definition ELFYAML.cpp:1743
static LLVM_ABI void mapping(IO &IO, ELFYAML::SectionHeader &SHdr)
Definition ELFYAML.cpp:956
static LLVM_ABI void mapping(IO &IO, ELFYAML::SectionOrType &sectionOrType)
Definition ELFYAML.cpp:1369
static LLVM_ABI void mapping(IO &IO, ELFYAML::StackSizeEntry &Rel)
Definition ELFYAML.cpp:1680
static LLVM_ABI void mapping(IO &IO, ELFYAML::Symbol &Symbol)
Definition ELFYAML.cpp:1172
static LLVM_ABI std::string validate(IO &IO, ELFYAML::Symbol &Symbol)
Definition ELFYAML.cpp:1192
static LLVM_ABI void mapping(IO &IO, ELFYAML::VerdefEntry &E)
Definition ELFYAML.cpp:1712
static LLVM_ABI void mapping(IO &IO, ELFYAML::VernauxEntry &E)
Definition ELFYAML.cpp:1733
static LLVM_ABI void mapping(IO &IO, ELFYAML::VerneedEntry &E)
Definition ELFYAML.cpp:1724
static LLVM_ABI std::string validate(IO &io, std::unique_ptr< ELFYAML::Chunk > &C)
Definition ELFYAML.cpp:1580
static LLVM_ABI void mapping(IO &IO, std::unique_ptr< ELFYAML::Chunk > &C)
Definition ELFYAML.cpp:1414
This class should be specialized by any type that needs to be converted to/from a YAML mapping.
Definition YAMLTraits.h:63
static LLVM_ABI void bitset(IO &IO, ELFYAML::ELF_EF &Value)
Definition ELFYAML.cpp:257
static LLVM_ABI void bitset(IO &IO, ELFYAML::ELF_PF &Value)
Definition ELFYAML.cpp:576
static LLVM_ABI void bitset(IO &IO, ELFYAML::ELF_SHF &Value)
Definition ELFYAML.cpp:584
static LLVM_ABI void bitset(IO &IO, ELFYAML::MIPS_AFL_ASE &Value)
Definition ELFYAML.cpp:928
static LLVM_ABI void bitset(IO &IO, ELFYAML::MIPS_AFL_FLAGS1 &Value)
Definition ELFYAML.cpp:949
This class should be specialized by any integer type that is a union of bit values and the YAML repre...
Definition YAMLTraits.h:124
static LLVM_ABI void enumeration(IO &IO, ELFYAML::ELF_DYNTAG &Value)
Definition ELFYAML.cpp:784
static LLVM_ABI void enumeration(IO &IO, ELFYAML::ELF_ELFCLASS &Value)
Definition ELFYAML.cpp:203
static LLVM_ABI void enumeration(IO &IO, ELFYAML::ELF_ELFDATA &Value)
Definition ELFYAML.cpp:213
static LLVM_ABI void enumeration(IO &IO, ELFYAML::ELF_ELFOSABI &Value)
Definition ELFYAML.cpp:224
static LLVM_ABI void enumeration(IO &IO, ELFYAML::ELF_EM &Value)
Definition ELFYAML.cpp:196
static LLVM_ABI void enumeration(IO &IO, ELFYAML::ELF_ET &Value)
Definition ELFYAML.cpp:44
static LLVM_ABI void enumeration(IO &IO, ELFYAML::ELF_NT &Value)
Definition ELFYAML.cpp:76
static LLVM_ABI void enumeration(IO &IO, ELFYAML::ELF_PT &Value)
Definition ELFYAML.cpp:56
static LLVM_ABI void enumeration(IO &IO, ELFYAML::ELF_REL &Value)
Definition ELFYAML.cpp:709
static LLVM_ABI void enumeration(IO &IO, ELFYAML::ELF_RSS &Value)
Definition ELFYAML.cpp:699
static LLVM_ABI void enumeration(IO &IO, ELFYAML::ELF_SHN &Value)
Definition ELFYAML.cpp:638
static LLVM_ABI void enumeration(IO &IO, ELFYAML::ELF_SHT &Value)
Definition ELFYAML.cpp:489
static LLVM_ABI void enumeration(IO &IO, ELFYAML::ELF_STB &Value)
Definition ELFYAML.cpp:672
static LLVM_ABI void enumeration(IO &IO, ELFYAML::ELF_STT &Value)
Definition ELFYAML.cpp:683
static LLVM_ABI void enumeration(IO &IO, ELFYAML::MIPS_ABI_FP &Value)
Definition ELFYAML.cpp:876
static LLVM_ABI void enumeration(IO &IO, ELFYAML::MIPS_AFL_EXT &Value)
Definition ELFYAML.cpp:890
static LLVM_ABI void enumeration(IO &IO, ELFYAML::MIPS_AFL_REG &Value)
Definition ELFYAML.cpp:866
static LLVM_ABI void enumeration(IO &IO, ELFYAML::MIPS_ISA &Value)
Definition ELFYAML.cpp:916
This class should be specialized by any integral type that converts to/from a YAML scalar where there...
Definition YAMLTraits.h:108
static LLVM_ABI void output(const ELFYAML::YAMLIntUInt &Val, void *Ctx, raw_ostream &Out)
Definition ELFYAML.cpp:1140
static LLVM_ABI StringRef input(StringRef Scalar, void *Ctx, ELFYAML::YAMLIntUInt &Val)
Definition ELFYAML.cpp:1145
static QuotingType mustQuote(StringRef)
Definition ELFYAML.h:770
This class should be specialized by type that requires custom conversion to/from a yaml scalar.
Definition YAMLTraits.h:150