LLVM 22.0.0git
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_OBJECTYAML_YAML2OBJ_H
12#define LLVM_OBJECTYAML_YAML2OBJ_H
13
14#include "llvm/ADT/STLExtras.h"
16#include <memory>
17
18namespace llvm {
19class raw_ostream;
20template <typename T> class SmallVectorImpl;
21class StringRef;
22class Twine;
23
24namespace object {
25class ObjectFile;
26}
27
28namespace COFFYAML {
29struct Object;
30}
31
32namespace ELFYAML {
33struct Object;
34}
35
36namespace GOFFYAML {
37struct Object;
38}
39
40namespace MinidumpYAML {
41struct Object;
42}
43
44namespace OffloadYAML {
45struct Binary;
46}
47
48namespace WasmYAML {
49struct Object;
50}
51
52namespace XCOFFYAML {
53struct Object;
54}
55
56namespace ArchYAML {
57struct Archive;
58}
59
60namespace DXContainerYAML {
61struct Object;
62} // namespace DXContainerYAML
63
64namespace yaml {
65class Input;
66struct YamlObjectFile;
67
68using ErrorHandler = llvm::function_ref<void(const Twine &Msg)>;
69
71 ErrorHandler EH);
73 ErrorHandler EH);
75 ErrorHandler EH);
77 uint64_t MaxSize);
79 ErrorHandler EH);
81 ErrorHandler EH);
83 ErrorHandler EH);
85 ErrorHandler EH);
87 ErrorHandler EH);
89 ErrorHandler EH);
90
91LLVM_ABI bool convertYAML(Input &YIn, raw_ostream &Out, ErrorHandler ErrHandler,
92 unsigned DocNum = 1, uint64_t MaxSize = UINT64_MAX);
93
94/// Convenience function for tests.
95LLVM_ABI std::unique_ptr<object::ObjectFile>
97 ErrorHandler ErrHandler);
98
99} // namespace yaml
100} // namespace llvm
101
102#endif
#define LLVM_ABI
Definition Compiler.h:213
This file contains some templates that are useful if you are working with the STL at all.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
StringRef - Represent a constant reference to a string, i.e.
Definition StringRef.h:55
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition Twine.h:82
An efficient, type-erasing, non-owning reference to a callable.
This class is the base class for all object file types.
Definition ObjectFile.h:231
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
The Input class is used to parse a yaml document into in-memory structs and vectors.
#define UINT64_MAX
Definition DataTypes.h:77
LLVM_ABI bool yaml2dxcontainer(DXContainerYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
LLVM_ABI bool yaml2elf(ELFYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH, uint64_t MaxSize)
LLVM_ABI bool yaml2goff(GOFFYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
LLVM_ABI bool yaml2coff(COFFYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
llvm::function_ref< void(const Twine &Msg)> ErrorHandler
Definition yaml2obj.h:68
LLVM_ABI bool convertYAML(Input &YIn, raw_ostream &Out, ErrorHandler ErrHandler, unsigned DocNum=1, uint64_t MaxSize=UINT64_MAX)
Definition yaml2obj.cpp:20
LLVM_ABI bool yaml2wasm(WasmYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
LLVM_ABI bool yaml2offload(OffloadYAML::Binary &Doc, raw_ostream &Out, ErrorHandler EH)
LLVM_ABI std::unique_ptr< object::ObjectFile > yaml2ObjectFile(SmallVectorImpl< char > &Storage, StringRef Yaml, ErrorHandler ErrHandler)
Convenience function for tests.
Definition yaml2obj.cpp:66
LLVM_ABI bool yaml2xcoff(XCOFFYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
LLVM_ABI bool yaml2macho(YamlObjectFile &Doc, raw_ostream &Out, ErrorHandler EH)
LLVM_ABI bool yaml2archive(ArchYAML::Archive &Doc, raw_ostream &Out, ErrorHandler EH)
LLVM_ABI bool yaml2minidump(MinidumpYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
This is an optimization pass for GlobalISel generic memory operations.
The top level structure representing a minidump object, consisting of a minidump header,...