LLVM  16.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 
17 namespace llvm {
18 class raw_ostream;
19 template <typename T> class SmallVectorImpl;
20 class StringRef;
21 class Twine;
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 OffloadYAML {
40 struct Binary;
41 }
42 
43 namespace WasmYAML {
44 struct Object;
45 }
46 
47 namespace XCOFFYAML {
48 struct Object;
49 }
50 
51 namespace ArchYAML {
52 struct Archive;
53 }
54 
55 namespace DXContainerYAML {
56 struct Object;
57 } // namespace DXContainerYAML
58 
59 namespace yaml {
60 class Input;
61 struct YamlObjectFile;
62 
63 using ErrorHandler = llvm::function_ref<void(const Twine &Msg)>;
64 
68  uint64_t MaxSize);
71  ErrorHandler EH);
76  ErrorHandler EH);
77 
78 bool convertYAML(Input &YIn, raw_ostream &Out, ErrorHandler ErrHandler,
79  unsigned DocNum = 1, uint64_t MaxSize = UINT64_MAX);
80 
81 /// Convenience function for tests.
82 std::unique_ptr<object::ObjectFile>
84  ErrorHandler ErrHandler);
85 
86 } // namespace yaml
87 } // namespace llvm
88 
89 #endif
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::MinidumpYAML::Object
The top level structure representing a minidump object, consisting of a minidump header,...
Definition: MinidumpYAML.h:201
llvm::yaml::yaml2xcoff
bool yaml2xcoff(XCOFFYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
Definition: XCOFFEmitter.cpp:779
llvm::yaml::YamlObjectFile
Definition: ObjectYAML.h:29
STLExtras.h
llvm::msgpack::Type::Binary
@ Binary
llvm::yaml::yaml2macho
bool yaml2macho(YamlObjectFile &Doc, raw_ostream &Out, ErrorHandler EH)
Definition: MachOEmitter.cpp:740
llvm::yaml::yaml2archive
bool yaml2archive(ArchYAML::Archive &Doc, raw_ostream &Out, ErrorHandler EH)
Definition: ArchiveEmitter.cpp:20
llvm::yaml::yaml2coff
bool yaml2coff(COFFYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
Definition: COFFEmitter.cpp:594
UINT64_MAX
#define UINT64_MAX
Definition: DataTypes.h:77
llvm::yaml::yaml2elf
bool yaml2elf(ELFYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH, uint64_t MaxSize)
Definition: ELFEmitter.cpp:1983
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
llvm::yaml::yaml2dxcontainer
bool yaml2dxcontainer(DXContainerYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
Definition: DXContainerEmitter.cpp:218
llvm::COFFYAML::Object
Definition: COFFYAML.h:103
llvm::OutputFileType::Object
@ Object
llvm::function_ref
An efficient, type-erasing, non-owning reference to a callable.
Definition: STLFunctionalExtras.h:36
llvm::ELFYAML::Object
Definition: ELFYAML.h:694
llvm::ArchYAML::Archive
Definition: ArchiveYAML.h:24
object
bar al al movzbl eax ret Missed when stored in a memory object
Definition: README.txt:1411
uint64_t
llvm::yaml::yaml2offload
bool yaml2offload(OffloadYAML::Binary &Doc, raw_ostream &Out, ErrorHandler EH)
Definition: OffloadEmitter.cpp:21
llvm::XCOFFYAML::Object
Definition: XCOFFYAML.h:208
llvm::codeview::CodeViewContainer::ObjectFile
@ ObjectFile
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
llvm::yaml::yaml2wasm
bool yaml2wasm(WasmYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
Definition: WasmEmitter.cpp:678
llvm::WasmYAML::Object
Definition: WasmYAML.h:416
llvm::AMDGPU::SendMsg::Msg
const CustomOperand< const MCSubtargetInfo & > Msg[]
Definition: AMDGPUAsmUtils.cpp:39
llvm::DXContainerYAML::Object
Definition: DXContainerYAML.h:83
llvm::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:81
llvm::yaml::yaml2minidump
bool yaml2minidump(MinidumpYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
Definition: MinidumpEmitter.cpp:230
llvm::yaml::yaml2ObjectFile
std::unique_ptr< object::ObjectFile > yaml2ObjectFile(SmallVectorImpl< char > &Storage, StringRef Yaml, ErrorHandler ErrHandler)
Convenience function for tests.
Definition: yaml2obj.cpp:65
llvm::yaml::convertYAML
bool convertYAML(Input &YIn, raw_ostream &Out, ErrorHandler ErrHandler, unsigned DocNum=1, uint64_t MaxSize=UINT64_MAX)
llvm::SmallVectorImpl< char >
llvm::OffloadYAML::Binary
Definition: OffloadYAML.h:26