blob: 078ab756695e4041a04c28e691ce170908ba4f24 [file] [log] [blame]
//===----- 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/ObjectYAML/YAML.h"
#include <cstdint>
namespace llvm {
namespace XCOFFYAML {
struct FileHeader {
llvm::yaml::Hex16 Magic;
uint16_t NumberOfSections;
int32_t TimeStamp;
llvm::yaml::Hex32 SymbolTableOffset; // File offset to symbol table.
int32_t NumberOfSymTableEntries;
uint16_t AuxHeaderSize;
llvm::yaml::Hex16 Flags;
};
struct Object {
FileHeader Header;
Object();
};
} // namespace XCOFFYAML
namespace yaml {
template <> struct MappingTraits<XCOFFYAML::FileHeader> {
static void mapping(IO &IO, XCOFFYAML::FileHeader &H);
};
template <> struct MappingTraits<XCOFFYAML::Object> {
static void mapping(IO &IO, XCOFFYAML::Object &Obj);
};
} // namespace yaml
} // namespace llvm
#endif // LLVM_OBJECTYAML_XCOFFYAML_H