[Alignment][NFC] Convert StoreInst to MaybeAlign
[llvm-complete.git] / include / llvm / ObjectYAML / XCOFFYAML.h
blobf99004e69762fe7a199c495d9d4d0b64f0746a3a
1 //===----- XCOFFYAML.h - XCOFF YAMLIO implementation ------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 //
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"
17 #include <vector>
19 namespace llvm {
20 namespace XCOFFYAML {
22 struct FileHeader {
23 llvm::yaml::Hex16 Magic;
24 uint16_t NumberOfSections;
25 int32_t TimeStamp;
26 llvm::yaml::Hex32 SymbolTableOffset; // File offset to symbol table.
27 int32_t NumberOfSymTableEntries;
28 uint16_t AuxHeaderSize;
29 llvm::yaml::Hex16 Flags;
32 struct Symbol {
33 StringRef SymbolName;
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
41 struct Object {
42 FileHeader Header;
43 std::vector<Symbol> Symbols;
44 Object();
46 } // namespace XCOFFYAML
47 } // namespace llvm
48 LLVM_YAML_IS_SEQUENCE_VECTOR(XCOFFYAML::Symbol)
49 namespace llvm {
50 namespace yaml {
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);
68 } // namespace yaml
69 } // namespace llvm
71 #endif // LLVM_OBJECTYAML_XCOFFYAML_H