• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- ObjectYAML.h ---------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_OBJECTYAML_OBJECTYAML_H
11 #define LLVM_OBJECTYAML_OBJECTYAML_H
12 
13 #include "llvm/Support/YAMLTraits.h"
14 #include "llvm/ObjectYAML/ELFYAML.h"
15 #include "llvm/ObjectYAML/COFFYAML.h"
16 #include "llvm/ObjectYAML/MachOYAML.h"
17 
18 namespace llvm {
19 namespace yaml {
20 
21 struct YamlObjectFile {
22   std::unique_ptr<ELFYAML::Object> Elf;
23   std::unique_ptr<COFFYAML::Object> Coff;
24   std::unique_ptr<MachOYAML::Object> MachO;
25   std::unique_ptr<MachOYAML::UniversalBinary> FatMachO;
26 };
27 
28 template <> struct MappingTraits<YamlObjectFile> {
29   static void mapping(IO &IO, YamlObjectFile &ObjectFile);
30 };
31 
32 } // namespace yaml
33 } // namespace llvm
34 
35 #endif
36