LLVM 19.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"
15#include <memory>
16
17namespace llvm {
18class raw_ostream;
19template <typename T> class SmallVectorImpl;
20class StringRef;
21class Twine;
22
23namespace object {
24class ObjectFile;
25}
26
27namespace COFFYAML {
28struct Object;
29}
30
31namespace ELFYAML {
32struct Object;
33}
34
35namespace GOFFYAML {
36struct Object;
37}
38
39namespace MinidumpYAML {
40struct Object;
41}
42
43namespace OffloadYAML {
44struct Binary;
45}
46
47namespace WasmYAML {
48struct Object;
49}
50
51namespace XCOFFYAML {
52struct Object;
53}
54
55namespace ArchYAML {
56struct Archive;
57}
58
59namespace DXContainerYAML {
60struct Object;
61} // namespace DXContainerYAML
62
63namespace yaml {
64class Input;
65struct YamlObjectFile;
66
67using ErrorHandler = llvm::function_ref<void(const Twine &Msg)>;
68
73 uint64_t MaxSize);
76 ErrorHandler EH);
81 ErrorHandler EH);
82
83bool convertYAML(Input &YIn, raw_ostream &Out, ErrorHandler ErrHandler,
84 unsigned DocNum = 1, uint64_t MaxSize = UINT64_MAX);
85
86/// Convenience function for tests.
87std::unique_ptr<object::ObjectFile>
89 ErrorHandler ErrHandler);
90
91} // namespace yaml
92} // namespace llvm
93
94#endif
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...
Definition: SmallVector.h:586
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:81
An efficient, type-erasing, non-owning reference to a callable.
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
#define UINT64_MAX
Definition: DataTypes.h:77
bool yaml2dxcontainer(DXContainerYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
bool yaml2elf(ELFYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH, uint64_t MaxSize)
bool yaml2goff(GOFFYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
bool yaml2coff(COFFYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
bool convertYAML(Input &YIn, raw_ostream &Out, ErrorHandler ErrHandler, unsigned DocNum=1, uint64_t MaxSize=UINT64_MAX)
bool yaml2wasm(WasmYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
bool yaml2offload(OffloadYAML::Binary &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:67
bool yaml2xcoff(XCOFFYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
bool yaml2macho(YamlObjectFile &Doc, raw_ostream &Out, ErrorHandler EH)
bool yaml2archive(ArchYAML::Archive &Doc, raw_ostream &Out, ErrorHandler EH)
bool yaml2minidump(MinidumpYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
The top level structure representing a minidump object, consisting of a minidump header,...
Definition: MinidumpYAML.h:201