ObjectYAML.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- ObjectYAML.h ---------------------------------------------*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_OBJECTYAML_OBJECTYAML_H
  14. #define LLVM_OBJECTYAML_OBJECTYAML_H
  15. #include "llvm/ObjectYAML/ArchiveYAML.h"
  16. #include "llvm/ObjectYAML/COFFYAML.h"
  17. #include "llvm/ObjectYAML/ELFYAML.h"
  18. #include "llvm/ObjectYAML/MachOYAML.h"
  19. #include "llvm/ObjectYAML/MinidumpYAML.h"
  20. #include "llvm/ObjectYAML/WasmYAML.h"
  21. #include "llvm/ObjectYAML/XCOFFYAML.h"
  22. #include "llvm/Support/YAMLTraits.h"
  23. #include <memory>
  24. namespace llvm {
  25. namespace yaml {
  26. class IO;
  27. struct YamlObjectFile {
  28. std::unique_ptr<ArchYAML::Archive> Arch;
  29. std::unique_ptr<ELFYAML::Object> Elf;
  30. std::unique_ptr<COFFYAML::Object> Coff;
  31. std::unique_ptr<MachOYAML::Object> MachO;
  32. std::unique_ptr<MachOYAML::UniversalBinary> FatMachO;
  33. std::unique_ptr<MinidumpYAML::Object> Minidump;
  34. std::unique_ptr<WasmYAML::Object> Wasm;
  35. std::unique_ptr<XCOFFYAML::Object> Xcoff;
  36. };
  37. template <> struct MappingTraits<YamlObjectFile> {
  38. static void mapping(IO &IO, YamlObjectFile &ObjectFile);
  39. };
  40. } // end namespace yaml
  41. } // end namespace llvm
  42. #endif // LLVM_OBJECTYAML_OBJECTYAML_H
  43. #ifdef __GNUC__
  44. #pragma GCC diagnostic pop
  45. #endif