llvm/llvm/include/llvm/ObjectYAML/XCOFFYAML.h

//===----- XCOFFYAML.h - XCOFF 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
//
//===----------------------------------------------------------------------===//
//
// This file declares classes for handling the YAML representation of XCOFF.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_OBJECTYAML_XCOFFYAML_H
#define LLVM_OBJECTYAML_XCOFFYAML_H

#include "llvm/BinaryFormat/XCOFF.h"
#include "llvm/ObjectYAML/YAML.h"
#include <optional>
#include <vector>

namespace llvm {
namespace XCOFFYAML {

struct FileHeader {};

struct AuxiliaryHeader {};

struct Relocation {};

struct Section {};

enum AuxSymbolType : uint8_t {};

struct AuxSymbolEnt {};

struct FileAuxEnt : AuxSymbolEnt {};

struct CsectAuxEnt : AuxSymbolEnt {};

struct FunctionAuxEnt : AuxSymbolEnt {};

struct ExcpetionAuxEnt : AuxSymbolEnt {}; // Only for XCOFF64.

struct BlockAuxEnt : AuxSymbolEnt {};

struct SectAuxEntForDWARF : AuxSymbolEnt {};

struct SectAuxEntForStat : AuxSymbolEnt {}; // Only for XCOFF32.

struct Symbol {};

struct StringTable {};

struct Object {};
} // namespace XCOFFYAML
} // namespace llvm

LLVM_YAML_IS_SEQUENCE_VECTOR(XCOFFYAML::Symbol)
LLVM_YAML_IS_SEQUENCE_VECTOR(XCOFFYAML::Relocation)
LLVM_YAML_IS_SEQUENCE_VECTOR(XCOFFYAML::Section)
LLVM_YAML_IS_SEQUENCE_VECTOR(std::unique_ptr<llvm::XCOFFYAML::AuxSymbolEnt>)

namespace llvm {
namespace yaml {

template <> struct ScalarBitSetTraits<XCOFF::SectionTypeFlags> {};

template <> struct ScalarEnumerationTraits<XCOFF::DwarfSectionSubtypeFlags> {};

template <> struct ScalarEnumerationTraits<XCOFF::StorageClass> {};

template <> struct ScalarEnumerationTraits<XCOFF::StorageMappingClass> {};

template <> struct ScalarEnumerationTraits<XCOFF::SymbolType> {};

template <> struct ScalarEnumerationTraits<XCOFF::CFileStringType> {};

template <> struct ScalarEnumerationTraits<XCOFFYAML::AuxSymbolType> {};

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

template <> struct MappingTraits<XCOFFYAML::AuxiliaryHeader> {};

template <> struct MappingTraits<std::unique_ptr<XCOFFYAML::AuxSymbolEnt>> {};

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

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

template <> struct MappingTraits<XCOFFYAML::Section> {};

template <> struct MappingTraits<XCOFFYAML::StringTable> {};

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

} // namespace yaml
} // namespace llvm

#endif // LLVM_OBJECTYAML_XCOFFYAML_H