Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:21

0001 //===- GOFFYAML.h - GOFF YAMLIO implementation ------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file declares classes for handling the YAML representation of GOFF.
0010 //
0011 //===----------------------------------------------------------------------===//
0012 
0013 #ifndef LLVM_OBJECTYAML_GOFFYAML_H
0014 #define LLVM_OBJECTYAML_GOFFYAML_H
0015 
0016 #include "llvm/ADT/StringRef.h"
0017 #include "llvm/BinaryFormat/GOFF.h"
0018 #include "llvm/ObjectYAML/YAML.h"
0019 #include <cstdint>
0020 #include <vector>
0021 
0022 namespace llvm {
0023 
0024 // The structure of the yaml files is not an exact 1:1 match to GOFF. In order
0025 // to use yaml::IO, we use these structures which are closer to the source.
0026 namespace GOFFYAML {
0027 
0028 struct FileHeader {
0029   uint32_t TargetEnvironment = 0;
0030   uint32_t TargetOperatingSystem = 0;
0031   uint16_t CCSID = 0;
0032   StringRef CharacterSetName;
0033   StringRef LanguageProductIdentifier;
0034   uint32_t ArchitectureLevel = 0;
0035   std::optional<uint16_t> InternalCCSID;
0036   std::optional<uint8_t> TargetSoftwareEnvironment;
0037 };
0038 
0039 struct Object {
0040   FileHeader Header;
0041   Object();
0042 };
0043 } // end namespace GOFFYAML
0044 } // end namespace llvm
0045 
0046 LLVM_YAML_DECLARE_MAPPING_TRAITS(GOFFYAML::FileHeader)
0047 LLVM_YAML_DECLARE_MAPPING_TRAITS(GOFFYAML::Object)
0048 
0049 #endif // LLVM_OBJECTYAML_GOFFYAML_H