LLVM: include/llvm/CGData/CodeGenDataWriter.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef LLVM_CGDATA_CODEGENDATAWRITER_H
14#define LLVM_CGDATA_CODEGENDATAWRITER_H
15
23
24namespace llvm {
25
26
27
29 enum class OStreamKind {
30 fd,
31 string,
32 svector,
33 };
34
35public:
41 : Kind(OStreamKind::svector), OS(SVEC),
43
48
49
50
51
53
57};
58
60
62
63
65
66
68
69public:
72
73
75
76
78
79
81
82
84
85
87
88
90 return static_cast<uint32_t>(DataKind) &
92 }
93
95 return static_cast<uint32_t>(DataKind) &
97 }
98
99private:
100
101 uint64_t OutlinedHashTreeOffset;
102
103
104 uint64_t StableFunctionMapOffset;
105
106
108
109
111
113};
114
115}
116
117#endif
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
A wrapper class to abstract writer stream with support of bytes back patching.
Definition CodeGenDataWriter.h:28
LLVM_ABI void patch(ArrayRef< CGDataPatchItem > P)
CGDataOStream(raw_string_ostream &STR)
Definition CodeGenDataWriter.h:38
void write8(uint8_t V)
Definition CodeGenDataWriter.h:47
raw_ostream & OS
Definition CodeGenDataWriter.h:55
void write32(uint32_t V)
Definition CodeGenDataWriter.h:46
uint64_t tell()
Definition CodeGenDataWriter.h:44
CGDataOStream(raw_fd_ostream &FD)
Definition CodeGenDataWriter.h:36
CGDataOStream(raw_svector_ostream &SVEC)
Definition CodeGenDataWriter.h:40
OStreamKind Kind
Definition CodeGenDataWriter.h:54
support::endian::Writer LE
Definition CodeGenDataWriter.h:56
void write(uint64_t V)
Definition CodeGenDataWriter.h:45
CGDataKind getCGDataKind() const
Return the attributes of the current CGData.
Definition CodeGenDataWriter.h:86
CodeGenDataWriter()=default
LLVM_ABI Error writeText(raw_fd_ostream &OS)
Write the codegen data in text format to OS.
LLVM_ABI Error write(raw_fd_ostream &OS)
Write the codegen data to OS.
bool hasOutlinedHashTree() const
Return true if the header indicates the data has an outlined hash tree.
Definition CodeGenDataWriter.h:89
bool hasStableFunctionMap() const
Return true if the header indicates the data has a stable function map.
Definition CodeGenDataWriter.h:94
LLVM_ABI void addRecord(OutlinedHashTreeRecord &Record)
Add the outlined hash tree record. The input hash tree is released.
~CodeGenDataWriter()=default
Lightweight error class with error context and mandatory checking.
A raw_ostream that writes to a file descriptor.
This class implements an extremely fast bulk output stream that can only output to a stream.
A raw_ostream that writes to an std::string.
A raw_ostream that writes to an SmallVector or SmallString.
This is an optimization pass for GlobalISel generic memory operations.
@ StableFunctionMergingMap
@ FunctionOutlinedHashTree
The structure of the serialized stable function map is as follows:
Adapter to write values to a stream in a particular byte order.