Marshall Clow | c57b888 | 2012-06-19 18:02:35 +0000 | [diff] [blame] | 1 | //===------ 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 Kramer | 00e08fc | 2014-08-13 16:26:38 +0000 | [diff] [blame] | 13 | #ifndef LLVM_TOOLS_OBJ2YAML_OBJ2YAML_H |
| 14 | #define LLVM_TOOLS_OBJ2YAML_OBJ2YAML_H |
Marshall Clow | c57b888 | 2012-06-19 18:02:35 +0000 | [diff] [blame] | 15 | |
Simon Atanasyan | 111454f | 2014-05-07 05:18:51 +0000 | [diff] [blame] | 16 | #include "llvm/Object/COFF.h" |
Derek Schuff | 349a48f | 2017-03-30 19:44:09 +0000 | [diff] [blame] | 17 | #include "llvm/Object/Wasm.h" |
Chandler Carruth | 4ffd89f | 2012-12-04 10:37:14 +0000 | [diff] [blame] | 18 | #include "llvm/Support/raw_ostream.h" |
Rafael Espindola | d5132f9 | 2014-06-12 17:38:55 +0000 | [diff] [blame] | 19 | #include <system_error> |
Marshall Clow | c57b888 | 2012-06-19 18:02:35 +0000 | [diff] [blame] | 20 | |
Rafael Espindola | 15aa07b | 2014-06-12 14:11:22 +0000 | [diff] [blame] | 21 | std::error_code coff2yaml(llvm::raw_ostream &Out, |
| 22 | const llvm::object::COFFObjectFile &Obj); |
| 23 | std::error_code elf2yaml(llvm::raw_ostream &Out, |
| 24 | const llvm::object::ObjectFile &Obj); |
Chris Bieneman | bf924c1 | 2016-05-11 22:07:45 +0000 | [diff] [blame] | 25 | std::error_code macho2yaml(llvm::raw_ostream &Out, |
Chris Bieneman | e92acf1 | 2016-06-24 20:42:28 +0000 | [diff] [blame] | 26 | const llvm::object::Binary &Obj); |
Derek Schuff | 349a48f | 2017-03-30 19:44:09 +0000 | [diff] [blame] | 27 | std::error_code wasm2yaml(llvm::raw_ostream &Out, |
| 28 | const llvm::object::WasmObjectFile &Obj); |
Marshall Clow | c57b888 | 2012-06-19 18:02:35 +0000 | [diff] [blame] | 29 | |
Chris Bieneman | 1523505 | 2016-12-07 21:47:28 +0000 | [diff] [blame] | 30 | // Forward decls for dwarf2yaml |
| 31 | namespace llvm { |
Rafael Espindola | ee809ac | 2017-07-19 22:27:28 +0000 | [diff] [blame] | 32 | class DWARFContext; |
Chris Bieneman | 1523505 | 2016-12-07 21:47:28 +0000 | [diff] [blame] | 33 | namespace DWARFYAML { |
Chris Bieneman | 4d6c7e9 | 2016-12-08 17:46:57 +0000 | [diff] [blame] | 34 | struct Data; |
Chris Bieneman | 1523505 | 2016-12-07 21:47:28 +0000 | [diff] [blame] | 35 | } |
| 36 | } |
| 37 | |
Rafael Espindola | ee809ac | 2017-07-19 22:27:28 +0000 | [diff] [blame] | 38 | std::error_code dwarf2yaml(llvm::DWARFContext &DCtx, llvm::DWARFYAML::Data &Y); |
Chris Bieneman | 1523505 | 2016-12-07 21:47:28 +0000 | [diff] [blame] | 39 | |
Marshall Clow | c57b888 | 2012-06-19 18:02:35 +0000 | [diff] [blame] | 40 | #endif |