LLVM 19.0.0git
GOFFYAML.cpp
Go to the documentation of this file.
1//===-- GOFFYAML.cpp - GOFF 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 defines classes for handling the YAML representation of GOFF.
10//
11//===----------------------------------------------------------------------===//
12
15#include <string.h>
16
17namespace llvm {
18namespace GOFFYAML {
19
21
22} // namespace GOFFYAML
23
24namespace yaml {
25
26void MappingTraits<GOFFYAML::FileHeader>::mapping(
27 IO &IO, GOFFYAML::FileHeader &FileHdr) {
28 IO.mapOptional("TargetEnvironment", FileHdr.TargetEnvironment, 0);
29 IO.mapOptional("TargetOperatingSystem", FileHdr.TargetOperatingSystem, 0);
30 IO.mapOptional("CCSID", FileHdr.CCSID, 0);
31 IO.mapOptional("CharacterSetName", FileHdr.CharacterSetName, "");
32 IO.mapOptional("LanguageProductIdentifier", FileHdr.LanguageProductIdentifier,
33 "");
34 IO.mapOptional("ArchitectureLevel", FileHdr.ArchitectureLevel, 1);
35 IO.mapOptional("InternalCCSID", FileHdr.InternalCCSID);
36 IO.mapOptional("TargetSoftwareEnvironment",
38}
39
40void MappingTraits<GOFFYAML::Object>::mapping(IO &IO, GOFFYAML::Object &Obj) {
41 IO.mapTag("!GOFF", true);
42 IO.mapRequired("FileHeader", Obj.Header);
43}
44
45} // namespace yaml
46} // namespace llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
std::optional< uint8_t > TargetSoftwareEnvironment
Definition: GOFFYAML.h:36
StringRef LanguageProductIdentifier
Definition: GOFFYAML.h:33
StringRef CharacterSetName
Definition: GOFFYAML.h:32
uint32_t TargetOperatingSystem
Definition: GOFFYAML.h:30
std::optional< uint16_t > InternalCCSID
Definition: GOFFYAML.h:35