llvm/llvm/include/llvm/ObjectYAML/ELFYAML.h

//===- ELFYAML.h - ELF YAMLIO implementation --------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
///
/// \file
/// This file declares classes for handling the YAML representation
/// of ELF.
///
//===----------------------------------------------------------------------===//

#ifndef LLVM_OBJECTYAML_ELFYAML_H
#define LLVM_OBJECTYAML_ELFYAML_H

#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/Object/ELFTypes.h"
#include "llvm/ObjectYAML/DWARFYAML.h"
#include "llvm/ObjectYAML/YAML.h"
#include "llvm/Support/YAMLTraits.h"
#include <cstdint>
#include <memory>
#include <optional>
#include <vector>

namespace llvm {
ELFYAML // end namespace ELFYAML
} // end namespace llvm

LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::StackSizeEntry)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::BBAddrMapEntry)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::BBAddrMapEntry::BBEntry)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::BBAddrMapEntry::BBRangeEntry)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::PGOAnalysisMapEntry)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::PGOAnalysisMapEntry::PGOBBEntry)
LLVM_YAML_IS_SEQUENCE_VECTOR(
    llvm::ELFYAML::PGOAnalysisMapEntry::PGOBBEntry::SuccessorEntry)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::DynamicEntry)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::LinkerOption)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::CallGraphEntryWeight)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::NoteEntry)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::ProgramHeader)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::SectionHeader)
LLVM_YAML_IS_SEQUENCE_VECTOR(std::unique_ptr<llvm::ELFYAML::Chunk>)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::Symbol)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::VerdefEntry)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::VernauxEntry)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::VerneedEntry)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::Relocation)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::SectionOrType)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::ARMIndexTableEntry)

namespace llvm {
namespace yaml {

template <> struct ScalarTraits<ELFYAML::YAMLIntUInt> {};

template <>
struct ScalarEnumerationTraits<ELFYAML::ELF_ET> {};

template <> struct ScalarEnumerationTraits<ELFYAML::ELF_PT> {};

template <> struct ScalarEnumerationTraits<ELFYAML::ELF_NT> {};

template <>
struct ScalarEnumerationTraits<ELFYAML::ELF_EM> {};

template <>
struct ScalarEnumerationTraits<ELFYAML::ELF_ELFCLASS> {};

template <>
struct ScalarEnumerationTraits<ELFYAML::ELF_ELFDATA> {};

template <>
struct ScalarEnumerationTraits<ELFYAML::ELF_ELFOSABI> {};

template <>
struct ScalarBitSetTraits<ELFYAML::ELF_EF> {};

template <> struct ScalarBitSetTraits<ELFYAML::ELF_PF> {};

template <>
struct ScalarEnumerationTraits<ELFYAML::ELF_SHT> {};

template <>
struct ScalarBitSetTraits<ELFYAML::ELF_SHF> {};

template <> struct ScalarEnumerationTraits<ELFYAML::ELF_SHN> {};

template <> struct ScalarEnumerationTraits<ELFYAML::ELF_STB> {};

template <>
struct ScalarEnumerationTraits<ELFYAML::ELF_STT> {};

template <>
struct ScalarEnumerationTraits<ELFYAML::ELF_REL> {};

template <>
struct ScalarEnumerationTraits<ELFYAML::ELF_DYNTAG> {};

template <>
struct ScalarEnumerationTraits<ELFYAML::ELF_RSS> {};

template <>
struct ScalarEnumerationTraits<ELFYAML::MIPS_AFL_REG> {};

template <>
struct ScalarEnumerationTraits<ELFYAML::MIPS_ABI_FP> {};

template <>
struct ScalarEnumerationTraits<ELFYAML::MIPS_AFL_EXT> {};

template <>
struct ScalarEnumerationTraits<ELFYAML::MIPS_ISA> {};

template <>
struct ScalarBitSetTraits<ELFYAML::MIPS_AFL_ASE> {};

template <>
struct ScalarBitSetTraits<ELFYAML::MIPS_AFL_FLAGS1> {};

template <>
struct MappingTraits<ELFYAML::FileHeader> {};

template <> struct MappingTraits<ELFYAML::SectionHeader> {};

template <> struct MappingTraits<ELFYAML::ProgramHeader> {};

template <>
struct MappingTraits<ELFYAML::Symbol> {};

template <> struct MappingTraits<ELFYAML::StackSizeEntry> {};

template <> struct MappingTraits<ELFYAML::BBAddrMapEntry> {};

template <> struct MappingTraits<ELFYAML::BBAddrMapEntry::BBRangeEntry> {};

template <> struct MappingTraits<ELFYAML::BBAddrMapEntry::BBEntry> {};

template <> struct MappingTraits<ELFYAML::PGOAnalysisMapEntry> {};

template <> struct MappingTraits<ELFYAML::PGOAnalysisMapEntry::PGOBBEntry> {};

template <>
struct MappingTraits<ELFYAML::PGOAnalysisMapEntry::PGOBBEntry::SuccessorEntry> {};

template <> struct MappingTraits<ELFYAML::GnuHashHeader> {};

template <> struct MappingTraits<ELFYAML::DynamicEntry> {};

template <> struct MappingTraits<ELFYAML::NoteEntry> {};

template <> struct MappingTraits<ELFYAML::VerdefEntry> {};

template <> struct MappingTraits<ELFYAML::VerneedEntry> {};

template <> struct MappingTraits<ELFYAML::VernauxEntry> {};

template <> struct MappingTraits<ELFYAML::LinkerOption> {};

template <> struct MappingTraits<ELFYAML::CallGraphEntryWeight> {};

template <> struct MappingTraits<ELFYAML::Relocation> {};

template <> struct MappingTraits<ELFYAML::ARMIndexTableEntry> {};

template <> struct MappingTraits<std::unique_ptr<ELFYAML::Chunk>> {};

template <>
struct MappingTraits<ELFYAML::Object> {};

template <> struct MappingTraits<ELFYAML::SectionOrType> {};

} // end namespace yaml
} // end namespace llvm

#endif // LLVM_OBJECTYAML_ELFYAML_H