LLVM: include/llvm/DebugInfo/GSYM/LineTable.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9#ifndef LLVM_DEBUGINFO_GSYM_LINETABLE_H
10#define LLVM_DEBUGINFO_GSYM_LINETABLE_H
11
15#include
16#include
17
18namespace llvm {
19namespace gsym {
20
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
120 typedef std::vectorgsym::LineEntry Collection;
121 Collection Lines;
122public:
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
142
143
144
145
146
147
148
149
150
151
152
153
154
157
158
159
160
161
162
163
164
165
166
168 bool empty() const { return Lines.empty(); }
169 void clear() { Lines.clear(); }
170
171
172
173
174 std::optional first() const {
175 if (Lines.empty())
176 return std::nullopt;
177 return Lines.front();
178 }
179
180
181
182
183 std::optional last() const {
184 if (Lines.empty())
185 return std::nullopt;
186 return Lines.back();
187 }
189 Lines.push_back(LE);
190 }
192 return !Lines.empty();
193 }
195 return Lines.size();
196 }
198 assert(i < Lines.size());
199 return Lines[i];
200 }
202 assert(i < Lines.size());
203 return Lines[i];
204 }
212 return Lines == RHS.Lines;
213 }
215 return Lines != RHS.Lines;
216 }
218 const auto LHSSize = Lines.size();
219 const auto RHSSize = RHS.Lines.size();
220 if (LHSSize == RHSSize)
221 return Lines < RHS.Lines;
222 return LHSSize < RHSSize;
223 }
224 Collection::const_iterator begin() const { return Lines.begin(); }
225 Collection::const_iterator end() const { return Lines.end(); }
226
227};
228
230
231}
232}
233
234#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
A simplified binary data writer class that doesn't require targets, target definitions,...
LineTable class contains deserialized versions of line tables for each function's address ranges.
Definition LineTable.h:119
bool operator==(const LineTable &RHS) const
Definition LineTable.h:211
Collection::const_iterator begin() const
Definition LineTable.h:224
void push(const LineEntry &LE)
Definition LineTable.h:188
bool empty() const
Definition LineTable.h:168
Collection::const_iterator end() const
Definition LineTable.h:225
std::optional< LineEntry > last() const
Return the last line entry if the line table isn't empty.
Definition LineTable.h:183
LLVM_ABI llvm::Error encode(FileWriter &O, uint64_t BaseAddr) const
Encode this LineTable object into FileWriter stream.
static LLVM_ABI llvm::Expected< LineTable > decode(DataExtractor &Data, uint64_t BaseAddr)
Decode an LineTable object from a binary data stream.
void clear()
Definition LineTable.h:169
size_t size() const
Definition LineTable.h:194
const LineEntry & get(size_t i) const
Definition LineTable.h:201
static LLVM_ABI Expected< LineEntry > lookup(DataExtractor &Data, uint64_t BaseAddr, uint64_t Addr)
Lookup a single address within a line table's data.
const LineEntry & operator[](size_t i) const
Definition LineTable.h:208
LineEntry & operator[](size_t i)
Definition LineTable.h:205
size_t isValid() const
Definition LineTable.h:191
bool operator<(const LineTable &RHS) const
Definition LineTable.h:217
LineEntry & get(size_t i)
Definition LineTable.h:197
std::optional< LineEntry > first() const
Return the first line entry if the line table isn't empty.
Definition LineTable.h:174
bool operator!=(const LineTable &RHS) const
Definition LineTable.h:214
This class implements an extremely fast bulk output stream that can only output to a stream.
LLVM_ABI raw_ostream & operator<<(raw_ostream &OS, const CallSiteInfo &CSI)
This is an optimization pass for GlobalISel generic memory operations.
FunctionAddr VTableAddr uintptr_t uintptr_t Data
Function information in GSYM files encodes information for one contiguous address range.
Line entries are used to encode the line tables in FunctionInfo objects.