LLVM 18.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 MinidumpYAML {
36struct Object;
37}
38
39namespace OffloadYAML {
40struct Binary;
41}
42
43namespace WasmYAML {
44struct Object;
45}
46
47namespace XCOFFYAML {
48struct Object;
49}
50
51namespace ArchYAML {
52struct Archive;
53}
54
55namespace DXContainerYAML {
56struct Object;
57} // namespace DXContainerYAML
58
59namespace yaml {
60class Input;
61struct YamlObjectFile;
62
63using ErrorHandler = llvm::function_ref<void(const Twine &Msg)>;
64
68 uint64_t MaxSize);
71 ErrorHandler EH);
76 ErrorHandler EH);
77
78bool convertYAML(Input &YIn, raw_ostream &Out, ErrorHandler ErrHandler,
79 unsigned DocNum = 1, uint64_t MaxSize = UINT64_MAX);
80
81/// Convenience function for tests.
82std::unique_ptr<object::ObjectFile>
84 ErrorHandler ErrHandler);
85
86} // namespace yaml
87} // namespace llvm
88
89#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:577
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 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:65
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