blob: 56f5f3947840cf95a0aeb2ca6e94dfe8df16b905 [file] [log] [blame]
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01001//===- ObjectYAML.h ---------------------------------------------*- C++ -*-===//
2//
Andrew Walbran16937d02019-10-22 13:54:20 +01003// 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
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01006//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_OBJECTYAML_OBJECTYAML_H
10#define LLVM_OBJECTYAML_OBJECTYAML_H
11
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>
18
19namespace llvm {
20namespace yaml {
21
22class IO;
23
24struct 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;
30};
31
32template <> struct MappingTraits<YamlObjectFile> {
33 static void mapping(IO &IO, YamlObjectFile &ObjectFile);
34};
35
36} // end namespace yaml
37} // end namespace llvm
38
39#endif // LLVM_OBJECTYAML_OBJECTYAML_H