blob: 3e96659462b09040f1d79a69c70cc2de3300634f [file] [log] [blame]
Marshall Clowc57b8882012-06-19 18:02:35 +00001//===------ utils/obj2yaml.hpp - obj2yaml conversion tool -------*- 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// This file declares some helper routines, and also the format-specific
9// writers. To add a new format, add the declaration here, and, in a separate
10// source file, implement it.
11//===----------------------------------------------------------------------===//
12
Benjamin Kramer00e08fc2014-08-13 16:26:38 +000013#ifndef LLVM_TOOLS_OBJ2YAML_OBJ2YAML_H
14#define LLVM_TOOLS_OBJ2YAML_OBJ2YAML_H
Marshall Clowc57b8882012-06-19 18:02:35 +000015
Simon Atanasyan111454f2014-05-07 05:18:51 +000016#include "llvm/Object/COFF.h"
Derek Schuff349a48f2017-03-30 19:44:09 +000017#include "llvm/Object/Wasm.h"
Chandler Carruth4ffd89f2012-12-04 10:37:14 +000018#include "llvm/Support/raw_ostream.h"
Rafael Espindolad5132f92014-06-12 17:38:55 +000019#include <system_error>
Marshall Clowc57b8882012-06-19 18:02:35 +000020
Rafael Espindola15aa07b2014-06-12 14:11:22 +000021std::error_code coff2yaml(llvm::raw_ostream &Out,
22 const llvm::object::COFFObjectFile &Obj);
23std::error_code elf2yaml(llvm::raw_ostream &Out,
24 const llvm::object::ObjectFile &Obj);
Chris Bienemanbf924c12016-05-11 22:07:45 +000025std::error_code macho2yaml(llvm::raw_ostream &Out,
Chris Bienemane92acf12016-06-24 20:42:28 +000026 const llvm::object::Binary &Obj);
Derek Schuff349a48f2017-03-30 19:44:09 +000027std::error_code wasm2yaml(llvm::raw_ostream &Out,
28 const llvm::object::WasmObjectFile &Obj);
Marshall Clowc57b8882012-06-19 18:02:35 +000029
Chris Bieneman15235052016-12-07 21:47:28 +000030// Forward decls for dwarf2yaml
31namespace llvm {
Rafael Espindolaee809ac2017-07-19 22:27:28 +000032class DWARFContext;
Chris Bieneman15235052016-12-07 21:47:28 +000033namespace DWARFYAML {
Chris Bieneman4d6c7e92016-12-08 17:46:57 +000034struct Data;
Chris Bieneman15235052016-12-07 21:47:28 +000035}
36}
37
Rafael Espindolaee809ac2017-07-19 22:27:28 +000038std::error_code dwarf2yaml(llvm::DWARFContext &DCtx, llvm::DWARFYAML::Data &Y);
Chris Bieneman15235052016-12-07 21:47:28 +000039
Marshall Clowc57b8882012-06-19 18:02:35 +000040#endif