llvm/llvm/include/llvm/ObjectYAML/WasmYAML.h

//===- WasmYAML.h - Wasm 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 wasm binaries.
///
//===----------------------------------------------------------------------===//

#ifndef LLVM_OBJECTYAML_WASMYAML_H
#define LLVM_OBJECTYAML_WASMYAML_H

#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/Wasm.h"
#include "llvm/ObjectYAML/YAML.h"
#include "llvm/Support/Casting.h"
#include <cstdint>
#include <memory>
#include <vector>

namespace llvm {
WasmYAML // end namespace WasmYAML
} // end namespace llvm

LLVM_YAML_IS_SEQUENCE_VECTOR(std::unique_ptr<llvm::WasmYAML::Section>)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::Signature)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::ValueType)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::Table)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::Import)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::Export)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::ElemSegment)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::Limits)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::DataSegment)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::Global)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::Function)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::LocalDecl)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::Relocation)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::NameEntry)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::ProducerEntry)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::FeatureEntry)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::SegmentInfo)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::SymbolInfo)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::InitFunction)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::ComdatEntry)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::Comdat)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::DylinkImportInfo)
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::WasmYAML::DylinkExportInfo)

namespace llvm {
namespace yaml {

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

template <> struct MappingTraits<std::unique_ptr<WasmYAML::Section>> {};

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

template <> struct MappingTraits<WasmYAML::Import> {};

template <> struct MappingTraits<WasmYAML::Export> {};

template <> struct MappingTraits<WasmYAML::Global> {};

template <> struct ScalarBitSetTraits<WasmYAML::LimitFlags> {};

template <> struct ScalarBitSetTraits<WasmYAML::SymbolFlags> {};

template <> struct ScalarEnumerationTraits<WasmYAML::SymbolKind> {};

template <> struct ScalarBitSetTraits<WasmYAML::SegmentFlags> {};

template <> struct ScalarEnumerationTraits<WasmYAML::SectionType> {};

template <> struct MappingTraits<WasmYAML::Signature> {};

template <> struct MappingTraits<WasmYAML::Table> {};

template <> struct MappingTraits<WasmYAML::Limits> {};

template <> struct MappingTraits<WasmYAML::Function> {};

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

template <> struct MappingTraits<WasmYAML::NameEntry> {};

template <> struct MappingTraits<WasmYAML::ProducerEntry> {};

template <> struct ScalarEnumerationTraits<WasmYAML::FeaturePolicyPrefix> {};

template <> struct MappingTraits<WasmYAML::FeatureEntry> {};

template <> struct MappingTraits<WasmYAML::SegmentInfo> {};

template <> struct MappingTraits<WasmYAML::LocalDecl> {};

template <> struct MappingTraits<WasmYAML::InitExpr> {};

template <> struct MappingTraits<WasmYAML::DataSegment> {};

template <> struct MappingTraits<WasmYAML::ElemSegment> {};

template <> struct MappingTraits<WasmYAML::SymbolInfo> {};

template <> struct MappingTraits<WasmYAML::InitFunction> {};

template <> struct ScalarEnumerationTraits<WasmYAML::ComdatKind> {};

template <> struct MappingTraits<WasmYAML::ComdatEntry> {};

template <> struct MappingTraits<WasmYAML::Comdat> {};

template <> struct ScalarEnumerationTraits<WasmYAML::ValueType> {};

template <> struct ScalarEnumerationTraits<WasmYAML::ExportKind> {};

template <> struct ScalarEnumerationTraits<WasmYAML::TableType> {};

template <> struct ScalarEnumerationTraits<WasmYAML::Opcode> {};

template <> struct ScalarEnumerationTraits<WasmYAML::RelocType> {};

template <> struct MappingTraits<WasmYAML::DylinkImportInfo> {};

template <> struct MappingTraits<WasmYAML::DylinkExportInfo> {};

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

#endif // LLVM_OBJECTYAML_WASMYAML_H