1 //===----- XCOFFYAML.h - XCOFF YAMLIO implementation ------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This file declares classes for handling the YAML representation of XCOFF.
11 //===----------------------------------------------------------------------===//
12 #ifndef LLVM_OBJECTYAML_XCOFFYAML_H
13 #define LLVM_OBJECTYAML_XCOFFYAML_H
15 #include "llvm/BinaryFormat/XCOFF.h"
16 #include "llvm/ObjectYAML/YAML.h"
23 llvm::yaml::Hex16 Magic
;
24 uint16_t NumberOfSections
;
26 llvm::yaml::Hex32 SymbolTableOffset
; // File offset to symbol table.
27 int32_t NumberOfSymTableEntries
;
28 uint16_t AuxHeaderSize
;
29 llvm::yaml::Hex16 Flags
;
34 llvm::yaml::Hex32 Value
; // Symbol value; storage class-dependent.
35 StringRef SectionName
;
36 llvm::yaml::Hex16 Type
;
37 XCOFF::StorageClass StorageClass
;
38 uint8_t NumberOfAuxEntries
; // Number of auxiliary entries
43 std::vector
<Symbol
> Symbols
;
46 } // namespace XCOFFYAML
48 LLVM_YAML_IS_SEQUENCE_VECTOR(XCOFFYAML::Symbol
)
52 template <> struct ScalarEnumerationTraits
<XCOFF::StorageClass
> {
53 static void enumeration(IO
&IO
, XCOFF::StorageClass
&Value
);
56 template <> struct MappingTraits
<XCOFFYAML::FileHeader
> {
57 static void mapping(IO
&IO
, XCOFFYAML::FileHeader
&H
);
60 template <> struct MappingTraits
<XCOFFYAML::Object
> {
61 static void mapping(IO
&IO
, XCOFFYAML::Object
&Obj
);
64 template <> struct MappingTraits
<XCOFFYAML::Symbol
> {
65 static void mapping(IO
&IO
, XCOFFYAML::Symbol
&S
);
71 #endif // LLVM_OBJECTYAML_XCOFFYAML_H