1 //===------ utils/obj2yaml.hpp - obj2yaml conversion tool -------*- C++ -*-===//
3 // 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
7 // This file declares some helper routines, and also the format-specific
8 // writers. To add a new format, add the declaration here, and, in a separate
9 // source file, implement it.
10 //===----------------------------------------------------------------------===//
12 #ifndef LLVM_TOOLS_OBJ2YAML_OBJ2YAML_H
13 #define LLVM_TOOLS_OBJ2YAML_OBJ2YAML_H
15 #include "llvm/Object/COFF.h"
16 #include "llvm/Object/Minidump.h"
17 #include "llvm/Object/Wasm.h"
18 #include "llvm/Object/XCOFFObjectFile.h"
19 #include "llvm/Support/raw_ostream.h"
20 #include <system_error>
22 std::error_code
coff2yaml(llvm::raw_ostream
&Out
,
23 const llvm::object::COFFObjectFile
&Obj
);
24 llvm::Error
elf2yaml(llvm::raw_ostream
&Out
,
25 const llvm::object::ObjectFile
&Obj
);
26 std::error_code
macho2yaml(llvm::raw_ostream
&Out
,
27 const llvm::object::Binary
&Obj
);
28 llvm::Error
minidump2yaml(llvm::raw_ostream
&Out
,
29 const llvm::object::MinidumpFile
&Obj
);
30 std::error_code
xcoff2yaml(llvm::raw_ostream
&Out
,
31 const llvm::object::XCOFFObjectFile
&Obj
);
32 std::error_code
wasm2yaml(llvm::raw_ostream
&Out
,
33 const llvm::object::WasmObjectFile
&Obj
);
35 // Forward decls for dwarf2yaml
43 std::error_code
dwarf2yaml(llvm::DWARFContext
&DCtx
, llvm::DWARFYAML::Data
&Y
);