Recommit [NFC] Better encapsulation of llvm::Optional Storage
[llvm-complete.git] / include / llvm / ObjectYAML / ObjectYAML.h
blob56f5f3947840cf95a0aeb2ca6e94dfe8df16b905
1 //===- ObjectYAML.h ---------------------------------------------*- 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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_OBJECTYAML_OBJECTYAML_H
10 #define LLVM_OBJECTYAML_OBJECTYAML_H
12 #include "llvm/ObjectYAML/COFFYAML.h"
13 #include "llvm/ObjectYAML/ELFYAML.h"
14 #include "llvm/ObjectYAML/MachOYAML.h"
15 #include "llvm/ObjectYAML/WasmYAML.h"
16 #include "llvm/Support/YAMLTraits.h"
17 #include <memory>
19 namespace llvm {
20 namespace yaml {
22 class IO;
24 struct YamlObjectFile {
25 std::unique_ptr<ELFYAML::Object> Elf;
26 std::unique_ptr<COFFYAML::Object> Coff;
27 std::unique_ptr<MachOYAML::Object> MachO;
28 std::unique_ptr<MachOYAML::UniversalBinary> FatMachO;
29 std::unique_ptr<WasmYAML::Object> Wasm;
32 template <> struct MappingTraits<YamlObjectFile> {
33 static void mapping(IO &IO, YamlObjectFile &ObjectFile);
36 } // end namespace yaml
37 } // end namespace llvm
39 #endif // LLVM_OBJECTYAML_OBJECTYAML_H