LLVM  10.0.0svn
yaml2obj.h
Go to the documentation of this file.
1 //===--- yaml2obj.h - -------------------------------------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 /// \file
9 /// Common declarations for yaml2obj
10 //===----------------------------------------------------------------------===//
11 #ifndef LLVM_TOOLS_YAML2OBJ_YAML2OBJ_H
12 #define LLVM_TOOLS_YAML2OBJ_YAML2OBJ_H
13 
14 #include "llvm/ADT/StringRef.h"
15 #include "llvm/Support/Error.h"
16 #include <memory>
17 
18 namespace llvm {
19 class raw_ostream;
20 template <typename T> class SmallVectorImpl;
21 template <typename T> class Expected;
22 
23 namespace object {
24 class ObjectFile;
25 }
26 
27 namespace COFFYAML {
28 struct Object;
29 }
30 
31 namespace ELFYAML {
32 struct Object;
33 }
34 
35 namespace MinidumpYAML {
36 struct Object;
37 }
38 
39 namespace WasmYAML {
40 struct Object;
41 }
42 
43 namespace yaml {
44 class Input;
45 struct YamlObjectFile;
46 
48 
53  ErrorHandler EH);
55 
56 bool convertYAML(Input &YIn, raw_ostream &Out, ErrorHandler ErrHandler,
57  unsigned DocNum = 1);
58 
59 /// Convenience function for tests.
60 std::unique_ptr<object::ObjectFile>
62  ErrorHandler ErrHandler);
63 
64 } // namespace yaml
65 } // namespace llvm
66 
67 #endif
bool yaml2macho(YamlObjectFile &Doc, raw_ostream &Out, ErrorHandler EH)
This class represents lattice values for constants.
Definition: AllocatorList.h:23
bool yaml2coff(COFFYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
An efficient, type-erasing, non-owning reference to a callable.
Definition: STLExtras.h:104
Tagged union holding either a T or a Error.
Definition: yaml2obj.h:21
The top level structure representing a minidump object, consisting of a minidump header, and zero or more streams.
Definition: MinidumpYAML.h:160
bool yaml2minidump(MinidumpYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
bool yaml2elf(ELFYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
bool convertYAML(Input &YIn, raw_ostream &Out, ErrorHandler ErrHandler, unsigned DocNum=1)
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:45
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
bool yaml2wasm(WasmYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
std::unique_ptr< object::ObjectFile > yaml2ObjectFile(SmallVectorImpl< char > &Storage, StringRef Yaml, ErrorHandler ErrHandler)
Convenience function for tests.
Definition: yaml2obj.cpp:57