llvm.org GIT mirror llvm / 932274e
Adding inline comments to code view type record directives for better readability git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366372 91177308-0d34-0410-b5e6-96231b3b80d8 Nilanjana Basu 2 months ago
5 changed file(s) with 331 addition(s) and 271 deletion(s). Raw diff Collapse all Expand all
3131 virtual void EmitBytes(StringRef Data) = 0;
3232 virtual void EmitIntValue(uint64_t Value, unsigned Size) = 0;
3333 virtual void EmitBinaryData(StringRef Data) = 0;
34 virtual void AddComment(const Twine &T) = 0;
3435 virtual ~CodeViewRecordStreamer() = default;
3536 };
3637
5859 Error beginRecord(Optional MaxLength);
5960 Error endRecord();
6061
61 Error mapInteger(TypeIndex &TypeInd);
62 Error mapInteger(TypeIndex &TypeInd, const Twine &Comment = "");
6263
6364 bool isStreaming() const {
6465 return (Streamer != nullptr) && (Reader == nullptr) && (Writer == nullptr);
9192 return Error::success();
9293 }
9394
94 template Error mapInteger(T &Value) {
95 if (isStreaming()) {
95 template Error mapInteger(T &Value, const Twine &Comment = "") {
96 if (isStreaming()) {
97 emitComment(Comment);
9698 Streamer->EmitIntValue((int)Value, sizeof(T));
9799 incrStreamedLen(sizeof(T));
98100 return Error::success();
104106 return Reader->readInteger(Value);
105107 }
106108
107 template Error mapEnum(T &Value) {
109 template Error mapEnum(T &Value, const Twine &Comment = "") {
108110 if (!isStreaming() && sizeof(Value) > maxFieldLength())
109111 return make_error(cv_error_code::insufficient_buffer);
110112
114116 if (isWriting() || isStreaming())
115117 X = static_cast(Value);
116118
117 if (auto EC = mapInteger(X))
119 if (auto EC = mapInteger(X, Comment))
118120 return EC;
119121
120122 if (isReading())
123125 return Error::success();
124126 }
125127
126 Error mapEncodedInteger(int64_t &Value);
127 Error mapEncodedInteger(uint64_t &Value);
128 Error mapEncodedInteger(APSInt &Value);
129 Error mapStringZ(StringRef &Value);
130 Error mapGuid(GUID &Guid);
131
132 Error mapStringZVectorZ(std::vector &Value);
128 Error mapEncodedInteger(int64_t &Value, const Twine &Comment = "");
129 Error mapEncodedInteger(uint64_t &Value, const Twine &Comment = "");
130 Error mapEncodedInteger(APSInt &Value, const Twine &Comment = "");
131 Error mapStringZ(StringRef &Value, const Twine &Comment = "");
132 Error mapGuid(GUID &Guid, const Twine &Comment = "");
133
134 Error mapStringZVectorZ(std::vector &Value,
135 const Twine &Comment = "");
133136
134137 template
135 Error mapVectorN(T &Items, const ElementMapper &Mapper) {
138 Error mapVectorN(T &Items, const ElementMapper &Mapper,
139 const Twine &Comment = "") {
136140 SizeType Size;
137141 if (isStreaming()) {
138142 Size = static_cast(Items.size());
143 emitComment(Comment);
139144 Streamer->EmitIntValue(Size, sizeof(Size));
140145 incrStreamedLen(sizeof(Size)); // add 1 for the delimiter
141146
167172 }
168173
169174 template
170 Error mapVectorTail(T &Items, const ElementMapper &Mapper) {
175 Error mapVectorTail(T &Items, const ElementMapper &Mapper,
176 const Twine &Comment = "") {
177 emitComment(Comment);
171178 if (isStreaming() || isWriting()) {
172179 for (auto &Item : Items) {
173180 if (auto EC = Mapper(*this, Item))
185192 return Error::success();
186193 }
187194
188 Error mapByteVectorTail(ArrayRef &Bytes);
189 Error mapByteVectorTail(std::vector &Bytes);
195 Error mapByteVectorTail(ArrayRef &Bytes, const Twine &Comment = "");
196 Error mapByteVectorTail(std::vector &Bytes,
197 const Twine &Comment = "");
190198
191199 Error padToAlignment(uint32_t Align);
192200 Error skipPadding();
198206 }
199207
200208 private:
201 void emitEncodedSignedInteger(const int64_t &Value);
202 void emitEncodedUnsignedInteger(const uint64_t &Value);
209 void emitEncodedSignedInteger(const int64_t &Value,
210 const Twine &Comment = "");
211 void emitEncodedUnsignedInteger(const uint64_t &Value,
212 const Twine &Comment = "");
203213 Error writeEncodedSignedInteger(const int64_t &Value);
204214 Error writeEncodedUnsignedInteger(const uint64_t &Value);
205215
211221 void resetStreamedLen() {
212222 if (isStreaming())
213223 StreamedLen = 4; // The record prefix is 4 bytes long
224 }
225
226 void emitComment(const Twine &Comment) {
227 if (isStreaming()) {
228 Twine TComment(Comment);
229 Streamer->AddComment(TComment);
230 }
214231 }
215232
216233 struct RecordLimit {
107107
108108 void EmitBinaryData(StringRef Data) { OS->EmitBinaryData(Data); }
109109
110 void AddComment(const Twine &T) { OS->AddComment(T); }
111
110112 private:
111113 MCStreamer *OS = nullptr;
112114 };
614616 OS.EmitBytes(NullTerminatedString);
615617 }
616618
619 static StringRef getTypeLeafName(TypeLeafKind TypeKind) {
620 for (const EnumEntry &EE : getTypeLeafNames())
621 if (EE.Value == TypeKind)
622 return EE.Name;
623 return "";
624 }
625
617626 void CodeViewDebug::emitTypeInformation() {
618627 if (TypeTable.empty())
619628 return;
658667
659668 auto RecordLen = Record.length();
660669 auto RecordKind = Record.kind();
661 OS.EmitIntValue(RecordLen - 2, 2);
662 OS.EmitIntValue(RecordKind, sizeof(RecordKind));
670 if (OS.isVerboseAsm())
671 CVMCOS.AddComment("Record length");
672 CVMCOS.EmitIntValue(RecordLen - 2, 2);
673 if (OS.isVerboseAsm())
674 CVMCOS.AddComment("Record kind: " + getTypeLeafName(RecordKind));
675 CVMCOS.EmitIntValue(RecordKind, sizeof(RecordKind));
663676
664677 Error E = codeview::visitTypeRecord(Record, *B, Pipeline);
665678
9696 return Reader->skip(BytesToAdvance);
9797 }
9898
99 Error CodeViewRecordIO::mapByteVectorTail(ArrayRef &Bytes) {
100 if (isStreaming()) {
99 Error CodeViewRecordIO::mapByteVectorTail(ArrayRef &Bytes,
100 const Twine &Comment) {
101 if (isStreaming()) {
102 emitComment(Comment);
101103 Streamer->EmitBinaryData(toStringRef(Bytes));
102104 incrStreamedLen(Bytes.size());
103105 } else if (isWriting()) {
110112 return Error::success();
111113 }
112114
113 Error CodeViewRecordIO::mapByteVectorTail(std::vector &Bytes) {
115 Error CodeViewRecordIO::mapByteVectorTail(std::vector &Bytes,
116 const Twine &Comment) {
114117 ArrayRef BytesRef(Bytes);
115 if (auto EC = mapByteVectorTail(BytesRef))
118 if (auto EC = mapByteVectorTail(BytesRef, Comment))
116119 return EC;
117120 if (!isWriting())
118121 Bytes.assign(BytesRef.begin(), BytesRef.end());
120123 return Error::success();
121124 }
122125
123 Error CodeViewRecordIO::mapInteger(TypeIndex &TypeInd) {
124 if (isStreaming()) {
126 Error CodeViewRecordIO::mapInteger(TypeIndex &TypeInd, const Twine &Comment) {
127 if (isStreaming()) {
128 emitComment(Comment);
125129 Streamer->EmitIntValue(TypeInd.getIndex(), sizeof(TypeInd.getIndex()));
126130 incrStreamedLen(sizeof(TypeInd.getIndex()));
127131 } else if (isWriting()) {
136140 return Error::success();
137141 }
138142
139 Error CodeViewRecordIO::mapEncodedInteger(int64_t &Value) {
143 Error CodeViewRecordIO::mapEncodedInteger(int64_t &Value,
144 const Twine &Comment) {
140145 if (isStreaming()) {
141146 if (Value >= 0)
142 emitEncodedUnsignedInteger(static_cast(Value));
147 emitEncodedUnsignedInteger(static_cast(Value), Comment);
143148 else
144 emitEncodedSignedInteger(Value);
149 emitEncodedSignedInteger(Value, Comment);
145150 } else if (isWriting()) {
146151 if (Value >= 0) {
147152 if (auto EC = writeEncodedUnsignedInteger(static_cast(Value)))
160165 return Error::success();
161166 }
162167
163 Error CodeViewRecordIO::mapEncodedInteger(uint64_t &Value) {
168 Error CodeViewRecordIO::mapEncodedInteger(uint64_t &Value,
169 const Twine &Comment) {
164170 if (isStreaming())
165 emitEncodedUnsignedInteger(Value);
171 emitEncodedUnsignedInteger(Value, Comment);
166172 else if (isWriting()) {
167173 if (auto EC = writeEncodedUnsignedInteger(Value))
168174 return EC;
175181 return Error::success();
176182 }
177183
178 Error CodeViewRecordIO::mapEncodedInteger(APSInt &Value) {
184 Error CodeViewRecordIO::mapEncodedInteger(APSInt &Value, const Twine &Comment) {
179185 if (isStreaming()) {
180186 if (Value.isSigned())
181 emitEncodedSignedInteger(Value.getSExtValue());
187 emitEncodedSignedInteger(Value.getSExtValue(), Comment);
182188 else
183 emitEncodedUnsignedInteger(Value.getZExtValue());
189 emitEncodedUnsignedInteger(Value.getZExtValue(), Comment);
184190 } else if (isWriting()) {
185191 if (Value.isSigned())
186192 return writeEncodedSignedInteger(Value.getSExtValue());
190196 return Error::success();
191197 }
192198
193 Error CodeViewRecordIO::mapStringZ(StringRef &Value) {
199 Error CodeViewRecordIO::mapStringZ(StringRef &Value, const Twine &Comment) {
194200 if (isStreaming()) {
195201 auto NullTerminatedString = StringRef(Value.data(), Value.size() + 1);
202 emitComment(Comment);
196203 Streamer->EmitBytes(NullTerminatedString);
197204 incrStreamedLen(NullTerminatedString.size());
198205 } else if (isWriting()) {
207214 return Error::success();
208215 }
209216
210 Error CodeViewRecordIO::mapGuid(GUID &Guid) {
217 Error CodeViewRecordIO::mapGuid(GUID &Guid, const Twine &Comment) {
211218 constexpr uint32_t GuidSize = 16;
212219
213220 if (isStreaming()) {
214221 StringRef GuidSR =
215222 StringRef((reinterpret_cast(&Guid)), GuidSize);
223 emitComment(Comment);
216224 Streamer->EmitBytes(GuidSR);
217225 incrStreamedLen(GuidSize);
218226 return Error::success();
233241 return Error::success();
234242 }
235243
236 Error CodeViewRecordIO::mapStringZVectorZ(std::vector &Value) {
244 Error CodeViewRecordIO::mapStringZVectorZ(std::vector &Value,
245 const Twine &Comment) {
237246
238247 if (!isReading()) {
248 emitComment(Comment);
239249 for (auto V : Value) {
240250 if (auto EC = mapStringZ(V))
241251 return EC;
256266 return Error::success();
257267 }
258268
259 void CodeViewRecordIO::emitEncodedSignedInteger(const int64_t &Value) {
269 void CodeViewRecordIO::emitEncodedSignedInteger(const int64_t &Value,
270 const Twine &Comment) {
260271 assert(Value < 0 && "Encoded integer is not signed!");
261272 if (Value >= std::numeric_limits::min()) {
262273 Streamer->EmitIntValue(LF_CHAR, 2);
274 emitComment(Comment);
263275 Streamer->EmitIntValue(Value, 1);
264276 incrStreamedLen(3);
265277 } else if (Value >= std::numeric_limits::min()) {
266278 Streamer->EmitIntValue(LF_SHORT, 2);
279 emitComment(Comment);
267280 Streamer->EmitIntValue(Value, 2);
268281 incrStreamedLen(4);
269282 } else if (Value >= std::numeric_limits::min()) {
270283 Streamer->EmitIntValue(LF_LONG, 2);
284 emitComment(Comment);
271285 Streamer->EmitIntValue(Value, 4);
272286 incrStreamedLen(6);
273287 } else {
274288 Streamer->EmitIntValue(LF_QUADWORD, 2);
289 emitComment(Comment);
275290 Streamer->EmitIntValue(Value, 4);
276291 incrStreamedLen(6);
277292 }
278293 }
279294
280 void CodeViewRecordIO::emitEncodedUnsignedInteger(const uint64_t &Value) {
295 void CodeViewRecordIO::emitEncodedUnsignedInteger(const uint64_t &Value,
296 const Twine &Comment) {
281297 if (Value < LF_NUMERIC) {
298 emitComment(Comment);
282299 Streamer->EmitIntValue(Value, 2);
283300 incrStreamedLen(2);
284301 } else if (Value <= std::numeric_limits::max()) {
285302 Streamer->EmitIntValue(LF_USHORT, 2);
303 emitComment(Comment);
286304 Streamer->EmitIntValue(Value, 2);
287305 incrStreamedLen(4);
288306 } else if (Value <= std::numeric_limits::max()) {
289307 Streamer->EmitIntValue(LF_ULONG, 2);
308 emitComment(Comment);
290309 Streamer->EmitIntValue(Value, 4);
291310 incrStreamedLen(6);
292311 } else {
293312 Streamer->EmitIntValue(LF_UQUADWORD, 2);
313 emitComment(Comment);
294314 Streamer->EmitIntValue(Value, 8);
295315 incrStreamedLen(6);
296316 }
2020 : IsFromOverloadList(IsFromOverloadList) {}
2121
2222 Error operator()(CodeViewRecordIO &IO, OneMethodRecord &Method) const {
23 error(IO.mapInteger(Method.Attrs.Attrs));
23 error(IO.mapInteger(Method.Attrs.Attrs, "AccessSpecifier"));
2424 if (IsFromOverloadList) {
2525 uint16_t Padding = 0;
26 error(IO.mapInteger(Padding));
26 error(IO.mapInteger(Padding, "Padding"));
2727 }
28 error(IO.mapInteger(Method.Type));
28 error(IO.mapInteger(Method.Type, "Type"));
2929 if (Method.isIntroducingVirtual()) {
30 error(IO.mapInteger(Method.VFTableOffset));
30 error(IO.mapInteger(Method.VFTableOffset, "VFTableOffset"));
3131 } else if (IO.isReading())
3232 Method.VFTableOffset = -1;
3333
3434 if (!IsFromOverloadList)
35 error(IO.mapStringZ(Method.Name));
35 error(IO.mapStringZ(Method.Name, "Name"));
3636
3737 return Error::success();
3838 }
7474 // Reading & Streaming mode come after writing mode is executed for each
7575 // record. Truncating large names are done during writing, so its not
7676 // necessary to do it while reading or streaming.
77 error(IO.mapStringZ(Name));
77 error(IO.mapStringZ(Name, "Name"));
7878 if (HasUniqueName)
79 error(IO.mapStringZ(UniqueName));
79 error(IO.mapStringZ(UniqueName, "LinkageName"));
8080 }
8181
8282 return Error::success();
143143 }
144144
145145 Error TypeRecordMapping::visitKnownRecord(CVType &CVR, ModifierRecord &Record) {
146 error(IO.mapInteger(Record.ModifiedType));
147 error(IO.mapEnum(Record.Modifiers));
146 error(IO.mapInteger(Record.ModifiedType, "ModifiedType"));
147 error(IO.mapEnum(Record.Modifiers, "Modifiers"));
148148 return Error::success();
149149 }
150150
151151 Error TypeRecordMapping::visitKnownRecord(CVType &CVR,
152152 ProcedureRecord &Record) {
153 error(IO.mapInteger(Record.ReturnType));
154 error(IO.mapEnum(Record.CallConv));
155 error(IO.mapEnum(Record.Options));
156 error(IO.mapInteger(Record.ParameterCount));
157 error(IO.mapInteger(Record.ArgumentList));
153 error(IO.mapInteger(Record.ReturnType, "ReturnType"));
154 error(IO.mapEnum(Record.CallConv, "CallingConvention"));
155 error(IO.mapEnum(Record.Options, "FunctionOptions"));
156 error(IO.mapInteger(Record.ParameterCount, "NumParameters"));
157 error(IO.mapInteger(Record.ArgumentList, "ArgListType"));
158158
159159 return Error::success();
160160 }
161161
162162 Error TypeRecordMapping::visitKnownRecord(CVType &CVR,
163163 MemberFunctionRecord &Record) {
164 error(IO.mapInteger(Record.ReturnType));
165 error(IO.mapInteger(Record.ClassType));
166 error(IO.mapInteger(Record.ThisType));
167 error(IO.mapEnum(Record.CallConv));
168 error(IO.mapEnum(Record.Options));
169 error(IO.mapInteger(Record.ParameterCount));
170 error(IO.mapInteger(Record.ArgumentList));
171 error(IO.mapInteger(Record.ThisPointerAdjustment));
164 error(IO.mapInteger(Record.ReturnType, "ReturnType"));
165 error(IO.mapInteger(Record.ClassType, "ClassType"));
166 error(IO.mapInteger(Record.ThisType, "ThisType"));
167 error(IO.mapEnum(Record.CallConv, "CallingConvention"));
168 error(IO.mapEnum(Record.Options, "FunctionOptions"));
169 error(IO.mapInteger(Record.ParameterCount, "NumParameters"));
170 error(IO.mapInteger(Record.ArgumentList, "ArgListType"));
171 error(IO.mapInteger(Record.ThisPointerAdjustment, "ThisAdjustment"));
172172
173173 return Error::success();
174174 }
176176 Error TypeRecordMapping::visitKnownRecord(CVType &CVR, ArgListRecord &Record) {
177177 error(IO.mapVectorN(
178178 Record.ArgIndices,
179 [](CodeViewRecordIO &IO, TypeIndex &N) { return IO.mapInteger(N); }));
179 [](CodeViewRecordIO &IO, TypeIndex &N) {
180 return IO.mapInteger(N, "Argument");
181 },
182 "NumArgs"));
180183 return Error::success();
181184 }
182185
184187 StringListRecord &Record) {
185188 error(IO.mapVectorN(
186189 Record.StringIndices,
187 [](CodeViewRecordIO &IO, TypeIndex &N) { return IO.mapInteger(N); }));
190 [](CodeViewRecordIO &IO, TypeIndex &N) {
191 return IO.mapInteger(N, "Strings");
192 },
193 "NumStrings"));
188194
189195 return Error::success();
190196 }
191197
192198 Error TypeRecordMapping::visitKnownRecord(CVType &CVR, PointerRecord &Record) {
193 error(IO.mapInteger(Record.ReferentType));
194 error(IO.mapInteger(Record.Attrs));
199 error(IO.mapInteger(Record.ReferentType, "PointeeType"));
200 error(IO.mapInteger(Record.Attrs, "Attributes"));
195201
196202 if (Record.isPointerToMember()) {
197203 if (IO.isReading())
198204 Record.MemberInfo.emplace();
199205
200206 MemberPointerInfo &M = *Record.MemberInfo;
201 error(IO.mapInteger(M.ContainingType));
202 error(IO.mapEnum(M.Representation));
207 error(IO.mapInteger(M.ContainingType, "ClassType"));
208 error(IO.mapEnum(M.Representation, "Representation"));
203209 }
204210
205211 return Error::success();
206212 }
207213
208214 Error TypeRecordMapping::visitKnownRecord(CVType &CVR, ArrayRecord &Record) {
209 error(IO.mapInteger(Record.ElementType));
210 error(IO.mapInteger(Record.IndexType));
211 error(IO.mapEncodedInteger(Record.Size));
212 error(IO.mapStringZ(Record.Name));
215 error(IO.mapInteger(Record.ElementType, "ElementType"));
216 error(IO.mapInteger(Record.IndexType, "IndexType"));
217 error(IO.mapEncodedInteger(Record.Size, "SizeOf"));
218 error(IO.mapStringZ(Record.Name, "Name"));
213219
214220 return Error::success();
215221 }
219225 (CVR.kind() == TypeLeafKind::LF_CLASS) ||
220226 (CVR.kind() == TypeLeafKind::LF_INTERFACE));
221227
222 error(IO.mapInteger(Record.MemberCount));
223 error(IO.mapEnum(Record.Options));
224 error(IO.mapInteger(Record.FieldList));
225 error(IO.mapInteger(Record.DerivationList));
226 error(IO.mapInteger(Record.VTableShape));
227 error(IO.mapEncodedInteger(Record.Size));
228 error(IO.mapInteger(Record.MemberCount, "MemberCount"));
229 error(IO.mapEnum(Record.Options, "Properties"));
230 error(IO.mapInteger(Record.FieldList, "FieldList"));
231 error(IO.mapInteger(Record.DerivationList, "DerivedFrom"));
232 error(IO.mapInteger(Record.VTableShape, "VShape"));
233 error(IO.mapEncodedInteger(Record.Size, "SizeOf"));
228234 error(mapNameAndUniqueName(IO, Record.Name, Record.UniqueName,
229235 Record.hasUniqueName()));
230236
232238 }
233239
234240 Error TypeRecordMapping::visitKnownRecord(CVType &CVR, UnionRecord &Record) {
235 error(IO.mapInteger(Record.MemberCount));
236 error(IO.mapEnum(Record.Options));
237 error(IO.mapInteger(Record.FieldList));
238 error(IO.mapEncodedInteger(Record.Size));
241 error(IO.mapInteger(Record.MemberCount, "MemberCount"));
242 error(IO.mapEnum(Record.Options, "Properties"));
243 error(IO.mapInteger(Record.FieldList, "FieldList"));
244 error(IO.mapEncodedInteger(Record.Size, "SizeOf"));
239245 error(mapNameAndUniqueName(IO, Record.Name, Record.UniqueName,
240246 Record.hasUniqueName()));
241247
243249 }
244250
245251 Error TypeRecordMapping::visitKnownRecord(CVType &CVR, EnumRecord &Record) {
246 error(IO.mapInteger(Record.MemberCount));
247 error(IO.mapEnum(Record.Options));
248 error(IO.mapInteger(Record.UnderlyingType));
249 error(IO.mapInteger(Record.FieldList));
252 error(IO.mapInteger(Record.MemberCount, "NumEnumerators"));
253 error(IO.mapEnum(Record.Options, "Properties"));
254 error(IO.mapInteger(Record.UnderlyingType, "UnderlyingType"));
255 error(IO.mapInteger(Record.FieldList, "FieldListType"));
250256 error(mapNameAndUniqueName(IO, Record.Name, Record.UniqueName,
251257 Record.hasUniqueName()));
252258
254260 }
255261
256262 Error TypeRecordMapping::visitKnownRecord(CVType &CVR, BitFieldRecord &Record) {
257 error(IO.mapInteger(Record.Type));
258 error(IO.mapInteger(Record.BitSize));
259 error(IO.mapInteger(Record.BitOffset));
263 error(IO.mapInteger(Record.Type, "Type"));
264 error(IO.mapInteger(Record.BitSize, "BitSize"));
265 error(IO.mapInteger(Record.BitOffset, "BitOffset"));
260266
261267 return Error::success();
262268 }
267273 if (!IO.isReading()) {
268274 ArrayRef Slots = Record.getSlots();
269275 Size = Slots.size();
270 error(IO.mapInteger(Size));
276 error(IO.mapInteger(Size, "VFEntryCount"));
271277
272278 for (size_t SlotIndex = 0; SlotIndex < Slots.size(); SlotIndex += 2) {
273279 uint8_t Byte = static_cast(Slots[SlotIndex]) << 4;
291297 }
292298
293299 Error TypeRecordMapping::visitKnownRecord(CVType &CVR, VFTableRecord &Record) {
294 error(IO.mapInteger(Record.CompleteClass));
295 error(IO.mapInteger(Record.OverriddenVFTable));
296 error(IO.mapInteger(Record.VFPtrOffset));
300 error(IO.mapInteger(Record.CompleteClass, "CompleteClass"));
301 error(IO.mapInteger(Record.OverriddenVFTable, "OverriddenVFTable"));
302 error(IO.mapInteger(Record.VFPtrOffset, "VFPtrOffset"));
297303 uint32_t NamesLen = 0;
298304 if (!IO.isReading()) {
299305 for (auto Name : Record.MethodNames)
300306 NamesLen += Name.size() + 1;
301307 }
302 error(IO.mapInteger(NamesLen));
308 error(IO.mapInteger(NamesLen, ""));
303309 error(IO.mapVectorTail(
304310 Record.MethodNames,
305 [](CodeViewRecordIO &IO, StringRef &S) { return IO.mapStringZ(S); }));
311 [](CodeViewRecordIO &IO, StringRef &S) {
312 return IO.mapStringZ(S, "MethodName");
313 },
314 "VFTableName"));
306315
307316 return Error::success();
308317 }
309318
310319 Error TypeRecordMapping::visitKnownRecord(CVType &CVR, StringIdRecord &Record) {
311 error(IO.mapInteger(Record.Id));
312 error(IO.mapStringZ(Record.String));
320 error(IO.mapInteger(Record.Id, "Id"));
321 error(IO.mapStringZ(Record.String, "StringData"));
313322
314323 return Error::success();
315324 }
316325
317326 Error TypeRecordMapping::visitKnownRecord(CVType &CVR,
318327 UdtSourceLineRecord &Record) {
319 error(IO.mapInteger(Record.UDT));
320 error(IO.mapInteger(Record.SourceFile));
321 error(IO.mapInteger(Record.LineNumber));
328 error(IO.mapInteger(Record.UDT, "UDT"));
329 error(IO.mapInteger(Record.SourceFile, "SourceFile"));
330 error(IO.mapInteger(Record.LineNumber, "LineNumber"));
322331
323332 return Error::success();
324333 }
325334
326335 Error TypeRecordMapping::visitKnownRecord(CVType &CVR,
327336 UdtModSourceLineRecord &Record) {
328 error(IO.mapInteger(Record.UDT));
329 error(IO.mapInteger(Record.SourceFile));
330 error(IO.mapInteger(Record.LineNumber));
331 error(IO.mapInteger(Record.Module));
337 error(IO.mapInteger(Record.UDT, "UDT"));
338 error(IO.mapInteger(Record.SourceFile, "SourceFile"));
339 error(IO.mapInteger(Record.LineNumber, "LineNumber"));
340 error(IO.mapInteger(Record.Module, "Module"));
332341
333342 return Error::success();
334343 }
335344
336345 Error TypeRecordMapping::visitKnownRecord(CVType &CVR, FuncIdRecord &Record) {
337 error(IO.mapInteger(Record.ParentScope));
338 error(IO.mapInteger(Record.FunctionType));
339 error(IO.mapStringZ(Record.Name));
346 error(IO.mapInteger(Record.ParentScope, "ParentScope"));
347 error(IO.mapInteger(Record.FunctionType, "FunctionType"));
348 error(IO.mapStringZ(Record.Name, "Name"));
340349
341350 return Error::success();
342351 }
343352
344353 Error TypeRecordMapping::visitKnownRecord(CVType &CVR,
345354 MemberFuncIdRecord &Record) {
346 error(IO.mapInteger(Record.ClassType));
347 error(IO.mapInteger(Record.FunctionType));
348 error(IO.mapStringZ(Record.Name));
355 error(IO.mapInteger(Record.ClassType, "ClassType"));
356 error(IO.mapInteger(Record.FunctionType, "FunctionType"));
357 error(IO.mapStringZ(Record.Name, "Name"));
349358
350359 return Error::success();
351360 }
354363 BuildInfoRecord &Record) {
355364 error(IO.mapVectorN(
356365 Record.ArgIndices,
357 [](CodeViewRecordIO &IO, TypeIndex &N) { return IO.mapInteger(N); }));
366 [](CodeViewRecordIO &IO, TypeIndex &N) {
367 return IO.mapInteger(N, "Argument");
368 },
369 "NumArgs"));
358370
359371 return Error::success();
360372 }
363375 MethodOverloadListRecord &Record) {
364376 // TODO: Split the list into multiple records if it's longer than 64KB, using
365377 // a subrecord of TypeRecordKind::Index to chain the records together.
366 error(IO.mapVectorTail(Record.Methods, MapOneMethodRecord(true)));
378 error(IO.mapVectorTail(Record.Methods, MapOneMethodRecord(true), "Method"));
367379
368380 return Error::success();
369381 }
377389
378390 Error TypeRecordMapping::visitKnownRecord(CVType &CVR,
379391 TypeServer2Record &Record) {
380 error(IO.mapGuid(Record.Guid));
381 error(IO.mapInteger(Record.Age));
382 error(IO.mapStringZ(Record.Name));
392 error(IO.mapGuid(Record.Guid, "Guid"));
393 error(IO.mapInteger(Record.Age, "Age"));
394 error(IO.mapStringZ(Record.Name, "Name"));
383395 return Error::success();
384396 }
385397
386398 Error TypeRecordMapping::visitKnownRecord(CVType &CVR, LabelRecord &Record) {
387 error(IO.mapEnum(Record.Mode));
399 error(IO.mapEnum(Record.Mode, "Mode"));
388400 return Error::success();
389401 }
390402
391403 Error TypeRecordMapping::visitKnownMember(CVMemberRecord &CVR,
392404 BaseClassRecord &Record) {
393 error(IO.mapInteger(Record.Attrs.Attrs));
394 error(IO.mapInteger(Record.Type));
395 error(IO.mapEncodedInteger(Record.Offset));
405 error(IO.mapInteger(Record.Attrs.Attrs, "AccessSpecifier"));
406 error(IO.mapInteger(Record.Type, "BaseType"));
407 error(IO.mapEncodedInteger(Record.Offset, "BaseOffset"));
396408
397409 return Error::success();
398410 }
402414 error(IO.mapInteger(Record.Attrs.Attrs));
403415
404416 // FIXME: Handle full APInt such as __int128.
405 error(IO.mapEncodedInteger(Record.Value));
406 error(IO.mapStringZ(Record.Name));
417 error(IO.mapEncodedInteger(Record.Value, "EnumValue"));
418 error(IO.mapStringZ(Record.Name, "Name"));
407419
408420 return Error::success();
409421 }
410422
411423 Error TypeRecordMapping::visitKnownMember(CVMemberRecord &CVR,
412424 DataMemberRecord &Record) {
413 error(IO.mapInteger(Record.Attrs.Attrs));
414 error(IO.mapInteger(Record.Type));
415 error(IO.mapEncodedInteger(Record.FieldOffset));
416 error(IO.mapStringZ(Record.Name));
425 error(IO.mapInteger(Record.Attrs.Attrs, "AccessSpecifier"));
426 error(IO.mapInteger(Record.Type, "Type"));
427 error(IO.mapEncodedInteger(Record.FieldOffset, "FieldOffset"));
428 error(IO.mapStringZ(Record.Name, "Name"));
417429
418430 return Error::success();
419431 }
420432
421433 Error TypeRecordMapping::visitKnownMember(CVMemberRecord &CVR,
422434 OverloadedMethodRecord &Record) {
423 error(IO.mapInteger(Record.NumOverloads));
424 error(IO.mapInteger(Record.MethodList));
425 error(IO.mapStringZ(Record.Name));
435 error(IO.mapInteger(Record.NumOverloads, "MethodCount"));
436 error(IO.mapInteger(Record.MethodList, "MethodListIndex"));
437 error(IO.mapStringZ(Record.Name, "Name"));
426438
427439 return Error::success();
428440 }
437449 Error TypeRecordMapping::visitKnownMember(CVMemberRecord &CVR,
438450 NestedTypeRecord &Record) {
439451 uint16_t Padding = 0;
440 error(IO.mapInteger(Padding));
441 error(IO.mapInteger(Record.Type));
442 error(IO.mapStringZ(Record.Name));
452 error(IO.mapInteger(Padding, "Padding"));
453 error(IO.mapInteger(Record.Type, "Type"));
454 error(IO.mapStringZ(Record.Name, "Name"));
443455
444456 return Error::success();
445457 }
447459 Error TypeRecordMapping::visitKnownMember(CVMemberRecord &CVR,
448460 StaticDataMemberRecord &Record) {
449461
450 error(IO.mapInteger(Record.Attrs.Attrs));
451 error(IO.mapInteger(Record.Type));
452 error(IO.mapStringZ(Record.Name));
462 error(IO.mapInteger(Record.Attrs.Attrs, "AccessSpecifier"));
463 error(IO.mapInteger(Record.Type, "Type"));
464 error(IO.mapStringZ(Record.Name, "Name"));
453465
454466 return Error::success();
455467 }
457469 Error TypeRecordMapping::visitKnownMember(CVMemberRecord &CVR,
458470 VirtualBaseClassRecord &Record) {
459471
460 error(IO.mapInteger(Record.Attrs.Attrs));
461 error(IO.mapInteger(Record.BaseType));
462 error(IO.mapInteger(Record.VBPtrType));
463 error(IO.mapEncodedInteger(Record.VBPtrOffset));
464 error(IO.mapEncodedInteger(Record.VTableIndex));
472 error(IO.mapInteger(Record.Attrs.Attrs, "AccessSpecifier"));
473 error(IO.mapInteger(Record.BaseType, "BaseType"));
474 error(IO.mapInteger(Record.VBPtrType, "VBPtrType"));
475 error(IO.mapEncodedInteger(Record.VBPtrOffset, "VBPtrOffset"));
476 error(IO.mapEncodedInteger(Record.VTableIndex, "VBTableIndex"));
465477
466478 return Error::success();
467479 }
469481 Error TypeRecordMapping::visitKnownMember(CVMemberRecord &CVR,
470482 VFPtrRecord &Record) {
471483 uint16_t Padding = 0;
472 error(IO.mapInteger(Padding));
473 error(IO.mapInteger(Record.Type));
484 error(IO.mapInteger(Padding, "Padding"));
485 error(IO.mapInteger(Record.Type, "Type"));
474486
475487 return Error::success();
476488 }
478490 Error TypeRecordMapping::visitKnownMember(CVMemberRecord &CVR,
479491 ListContinuationRecord &Record) {
480492 uint16_t Padding = 0;
481 error(IO.mapInteger(Padding));
482 error(IO.mapInteger(Record.ContinuationIndex));
493 error(IO.mapInteger(Padding, "Padding"));
494 error(IO.mapInteger(Record.ContinuationIndex, "ContinuationIndex"));
483495
484496 return Error::success();
485497 }
486498
487499 Error TypeRecordMapping::visitKnownRecord(CVType &CVR,
488500 PrecompRecord &Precomp) {
489 error(IO.mapInteger(Precomp.StartTypeIndex));
490 error(IO.mapInteger(Precomp.TypesCount));
491 error(IO.mapInteger(Precomp.Signature));
492 error(IO.mapStringZ(Precomp.PrecompFilePath));
501 error(IO.mapInteger(Precomp.StartTypeIndex, "StartIndex"));
502 error(IO.mapInteger(Precomp.TypesCount, "Count"));
503 error(IO.mapInteger(Precomp.Signature, "Signature"));
504 error(IO.mapStringZ(Precomp.PrecompFilePath, "PrecompFile"));
493505 return Error::success();
494506 }
495507
496508 Error TypeRecordMapping::visitKnownRecord(CVType &CVR,
497509 EndPrecompRecord &EndPrecomp) {
498 error(IO.mapInteger(EndPrecomp.Signature));
499 return Error::success();
500 }
510 error(IO.mapInteger(EndPrecomp.Signature, "Signature"));
511 return Error::success();
512 }
346346 ; CHECK: ]
347347 ; CHECK: ]
348348
349
350
351349 ; ASM: .section .debug$T,"dr"
352350 ; ASM: .p2align 2
353351 ; ASM: .long 4 # Debug section magic
354 ; ASM: .short 18
355 ; ASM: .short 4609
356 ; ASM: .long 3
357 ; ASM: .long 64
358 ; ASM: .long 65
359 ; ASM: .long 19
352 ; ASM: .short 18 # Record length
353 ; ASM: .short 4609 # Record kind: LF_ARGLIST
354 ; ASM: .long 3 # NumArgs
355 ; ASM: .long 64 # Argument
356 ; ASM: .long 65 # Argument
357 ; ASM: .long 19 # Argument
360358 ; ASM: # ArgList (0x1000) {
361359 ; ASM: # TypeLeafKind: LF_ARGLIST (0x1201)
362360 ; ASM: # NumArgs: 3
366364 ; ASM: # ArgType: __int64 (0x13)
367365 ; ASM: # ]
368366 ; ASM: # }
369 ; ASM: .short 14
370 ; ASM: .short 4104
371 ; ASM: .long 3
372 ; ASM: .byte 0
373 ; ASM: .byte 0
374 ; ASM: .short 3
375 ; ASM: .long 4096
367 ; ASM: .short 14 # Record length
368 ; ASM: .short 4104 # Record kind: LF_PROCEDURE
369 ; ASM: .long 3 # ReturnType
370 ; ASM: .byte 0 # CallingConvention
371 ; ASM: .byte 0 # FunctionOptions
372 ; ASM: .short 3 # NumParameters
373 ; ASM: .long 4096 # ArgListType
376374 ; ASM: # Procedure (0x1001) {
377375 ; ASM: # TypeLeafKind: LF_PROCEDURE (0x1008)
378376 ; ASM: # ReturnType: void (0x3)
382380 ; ASM: # NumParameters: 3
383381 ; ASM: # ArgListType: (float, double, __int64) (0x1000)
384382 ; ASM: # }
385 ; ASM: .short 14
386 ; ASM: .short 5633
387 ; ASM: .long 0
388 ; ASM: .long 4097
389 ; ASM: .asciz "f"
383 ; ASM: .short 14 # Record length
384 ; ASM: .short 5633 # Record kind: LF_FUNC_ID
385 ; ASM: .long 0 # ParentScope
386 ; ASM: .long 4097 # FunctionType
387 ; ASM: .asciz "f" # Name
390388 ; ASM: .byte 242
391389 ; ASM: .byte 241
392390 ; ASM: # FuncId (0x1002) {
395393 ; ASM: # FunctionType: void (float, double, __int64) (0x1001)
396394 ; ASM: # Name: f
397395 ; ASM: # }
398 ; ASM: .short 10
399 ; ASM: .short 4097
400 ; ASM: .long 116
401 ; ASM: .short 1
396 ; ASM: .short 10 # Record length
397 ; ASM: .short 4097 # Record kind: LF_MODIFIER
398 ; ASM: .long 116 # ModifiedType
399 ; ASM: .short 1 # Modifiers
402400 ; ASM: .byte 242
403401 ; ASM: .byte 241
404402 ; ASM: # Modifier (0x1003) {
408406 ; ASM: # Const (0x1)
409407 ; ASM: # ]
410408 ; ASM: # }
411 ; ASM: .short 10
412 ; ASM: .short 4098
413 ; ASM: .long 4099
414 ; ASM: .long 65548
409 ; ASM: .short 10 # Record length
410 ; ASM: .short 4098 # Record kind: LF_POINTER
411 ; ASM: .long 4099 # PointeeType
412 ; ASM: .long 65548 # Attributes
415413 ; ASM: # Pointer (0x1004) {
416414 ; ASM: # TypeLeafKind: LF_POINTER (0x1002)
417415 ; ASM: # PointeeType: const int (0x1003)
426424 ; ASM: # IsThisPtr&&: 0
427425 ; ASM: # SizeOf: 8
428426 ; ASM: # }
429 ; ASM: .short 22
430 ; ASM: .short 5381
431 ; ASM: .short 0
432 ; ASM: .short 128
433 ; ASM: .long 0
434 ; ASM: .long 0
435 ; ASM: .long 0
436 ; ASM: .short 0
437 ; ASM: .asciz "A"
427 ; ASM: .short 22 # Record length
428 ; ASM: .short 5381 # Record kind: LF_STRUCTURE
429 ; ASM: .short 0 # MemberCount
430 ; ASM: .short 128 # Properties
431 ; ASM: .long 0 # FieldList
432 ; ASM: .long 0 # DerivedFrom
433 ; ASM: .long 0 # VShape
434 ; ASM: .short 0 # SizeOf
435 ; ASM: .asciz "A" # Name
438436 ; ASM: # Struct (0x1005) {
439437 ; ASM: # TypeLeafKind: LF_STRUCTURE (0x1505)
440438 ; ASM: # MemberCount: 0
447445 ; ASM: # SizeOf: 0
448446 ; ASM: # Name: A
449447 ; ASM: # }
450 ; ASM: .short 18
451 ; ASM: .short 4098
452 ; ASM: .long 116
453 ; ASM: .long 32844
454 ; ASM: .long 4101
455 ; ASM: .short 4
448 ; ASM: .short 18 # Record length
449 ; ASM: .short 4098 # Record kind: LF_POINTER
450 ; ASM: .long 116 # PointeeType
451 ; ASM: .long 32844 # Attributes
452 ; ASM: .long 4101 # ClassType
453 ; ASM: .short 4 # Representation
456454 ; ASM: .byte 242
457455 ; ASM: .byte 241
458456 ; ASM: # Pointer (0x1006) {
471469 ; ASM: # ClassType: A (0x1005)
472470 ; ASM: # Representation: GeneralData (0x4)
473471 ; ASM: # }
474 ; ASM: .short 10
475 ; ASM: .short 4098
476 ; ASM: .long 4101
477 ; ASM: .long 66572
472 ; ASM: .short 10 # Record length
473 ; ASM: .short 4098 # Record kind: LF_POINTER
474 ; ASM: .long 4101 # PointeeType
475 ; ASM: .long 66572 # Attributes
478476 ; ASM: # Pointer (0x1007) {
479477 ; ASM: # TypeLeafKind: LF_POINTER (0x1002)
480478 ; ASM: # PointeeType: A (0x1005)
489487 ; ASM: # IsThisPtr&&: 0
490488 ; ASM: # SizeOf: 8
491489 ; ASM: # }
492 ; ASM: .short 6
493 ; ASM: .short 4609
494 ; ASM: .long 0
490 ; ASM: .short 6 # Record length
491 ; ASM: .short 4609 # Record kind: LF_ARGLIST
492 ; ASM: .long 0 # NumArgs
495493 ; ASM: # ArgList (0x1008) {
496494 ; ASM: # TypeLeafKind: LF_ARGLIST (0x1201)
497495 ; ASM: # NumArgs: 0
498496 ; ASM: # Arguments [
499497 ; ASM: # ]
500498 ; ASM: # }
501 ; ASM: .short 26
502 ; ASM: .short 4105
503 ; ASM: .long 3
504 ; ASM: .long 4101
505 ; ASM: .long 4103
506 ; ASM: .byte 0
507 ; ASM: .byte 0
508 ; ASM: .short 0
509 ; ASM: .long 4104
510 ; ASM: .long 0
499 ; ASM: .short 26 # Record length
500 ; ASM: .short 4105 # Record kind: LF_MFUNCTION
501 ; ASM: .long 3 # ReturnType
502 ; ASM: .long 4101 # ClassType
503 ; ASM: .long 4103 # ThisType
504 ; ASM: .byte 0 # CallingConvention
505 ; ASM: .byte 0 # FunctionOptions
506 ; ASM: .short 0 # NumParameters
507 ; ASM: .long 4104 # ArgListType
508 ; ASM: .long 0 # ThisAdjustment
511509 ; ASM: # MemberFunction (0x1009) {
512510 ; ASM: # TypeLeafKind: LF_MFUNCTION (0x1009)
513511 ; ASM: # ReturnType: void (0x3)
520518 ; ASM: # ArgListType: () (0x1008)
521519 ; ASM: # ThisAdjustment: 0
522520 ; ASM: # }
523 ; ASM: .short 30
524 ; ASM: .short 4611
521 ; ASM: .short 30 # Record length
522 ; ASM: .short 4611 # Record kind: LF_FIELDLIST
525523 ; ASM: .byte 0x0d, 0x15, 0x03, 0x00
526524 ; ASM: .byte 0x74, 0x00, 0x00, 0x00
527525 ; ASM: .byte 0x00, 0x00, 0x61, 0x00
545543 ; ASM: # Name: A::f
546544 ; ASM: # }
547545 ; ASM: # }
548 ; ASM: .short 22
549 ; ASM: .short 5381
550 ; ASM: .short 2
551 ; ASM: .short 0
552 ; ASM: .long 4106
553 ; ASM: .long 0
554 ; ASM: .long 0
555 ; ASM: .short 4
556 ; ASM: .asciz "A"
546 ; ASM: .short 22 # Record length
547 ; ASM: .short 5381 # Record kind: LF_STRUCTURE
548 ; ASM: .short 2 # MemberCount
549 ; ASM: .short 0 # Properties
550 ; ASM: .long 4106 # FieldList
551 ; ASM: .long 0 # DerivedFrom
552 ; ASM: .long 0 # VShape
553 ; ASM: .short 4 # SizeOf
554 ; ASM: .asciz "A" # Name
557555 ; ASM: # Struct (0x100B) {
558556 ; ASM: # TypeLeafKind: LF_STRUCTURE (0x1505)
559557 ; ASM: # MemberCount: 2
565563 ; ASM: # SizeOf: 4
566564 ; ASM: # Name: A
567565 ; ASM: # }
568 ; ASM: .short 30
569 ; ASM: .short 5637
570 ; ASM: .long 0
571 ; ASM: .asciz "D:\\src\\llvm\\build\\t.cpp"
566 ; ASM: .short 30 # Record length
567 ; ASM: .short 5637 # Record kind: LF_STRING_ID
568 ; ASM: .long 0 # Id
569 ; ASM: .asciz "D:\\src\\llvm\\build\\t.cpp" # StringData
572570 ; ASM: # StringId (0x100C) {
573571 ; ASM: # TypeLeafKind: LF_STRING_ID (0x1605)
574572 ; ASM: # Id: 0x0
575573 ; ASM: # StringData: D:\src\llvm\build\t.cpp
576574 ; ASM: # }
577 ; ASM: .short 14
578 ; ASM: .short 5638
579 ; ASM: .long 4107
580 ; ASM: .long 4108
581 ; ASM: .long 1
575 ; ASM: .short 14 # Record length
576 ; ASM: .short 5638 # Record kind: LF_UDT_SRC_LINE
577 ; ASM: .long 4107 # UDT
578 ; ASM: .long 4108 # SourceFile
579 ; ASM: .long 1 # LineNumber
582580 ; ASM: # UdtSourceLine (0x100D) {
583581 ; ASM: # TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
584582 ; ASM: # UDT: A (0x100B)
585583 ; ASM: # SourceFile: D:\src\llvm\build\t.cpp (0x100C)
586584 ; ASM: # LineNumber: 1
587585 ; ASM: # }
588 ; ASM: .short 18
589 ; ASM: .short 4098
590 ; ASM: .long 4105
591 ; ASM: .long 65644
592 ; ASM: .long 4101
593 ; ASM: .short 8
586 ; ASM: .short 18 # Record length
587 ; ASM: .short 4098 # Record kind: LF_POINTER
588 ; ASM: .long 4105 # PointeeType
589 ; ASM: .long 65644 # Attributes
590 ; ASM: .long 4101 # ClassType
591 ; ASM: .short 8 # Representation
594592 ; ASM: .byte 242
595593 ; ASM: .byte 241
596594 ; ASM: # Pointer (0x100E) {
609607 ; ASM: # ClassType: A (0x1005)
610608 ; ASM: # Representation: GeneralFunction (0x8)
611609 ; ASM: # }
612 ; ASM: .short 10
613 ; ASM: .short 4097
614 ; ASM: .long 3
615 ; ASM: .short 1
610 ; ASM: .short 10 # Record length
611 ; ASM: .short 4097 # Record kind: LF_MODIFIER
612 ; ASM: .long 3 # ModifiedType
613 ; ASM: .short 1 # Modifiers
616614 ; ASM: .byte 242
617615 ; ASM: .byte 241
618616 ; ASM: # Modifier (0x100F) {
622620 ; ASM: # Const (0x1)
623621 ; ASM: # ]
624622 ; ASM: # }
625 ; ASM: .short 10
626 ; ASM: .short 4098
627 ; ASM: .long 4111
628 ; ASM: .long 65548
623 ; ASM: .short 10 # Record length
624 ; ASM: .short 4098 # Record kind: LF_POINTER
625 ; ASM: .long 4111 # PointeeType
626 ; ASM: .long 65548 # Attributes
629627 ; ASM: # Pointer (0x1010) {
630628 ; ASM: # TypeLeafKind: LF_POINTER (0x1002)
631629 ; ASM: # PointeeType: const void (0x100F)
640638 ; ASM: # IsThisPtr&&: 0
641639 ; ASM: # SizeOf: 8
642640 ; ASM: # }
643 ; ASM: .short 14
644 ; ASM: .short 4104
645 ; ASM: .long 3
646 ; ASM: .byte 0
647 ; ASM: .byte 0
648 ; ASM: .short 0
649 ; ASM: .long 4104
641 ; ASM: .short 14 # Record length
642 ; ASM: .short 4104 # Record kind: LF_PROCEDURE
643 ; ASM: .long 3 # ReturnType
644 ; ASM: .byte 0 # CallingConvention
645 ; ASM: .byte 0 # FunctionOptions
646 ; ASM: .short 0 # NumParameters
647 ; ASM: .long 4104 # ArgListType
650648 ; ASM: # Procedure (0x1011) {
651649 ; ASM: # TypeLeafKind: LF_PROCEDURE (0x1008)
652650 ; ASM: # ReturnType: void (0x3)
656654 ; ASM: # NumParameters: 0
657655 ; ASM: # ArgListType: () (0x1008)
658656 ; ASM: # }
659 ; ASM: .short 22
660 ; ASM: .short 5633
661 ; ASM: .long 0
662 ; ASM: .long 4113
663 ; ASM: .asciz "CharTypes"
657 ; ASM: .short 22 # Record length
658 ; ASM: .short 5633 # Record kind: LF_FUNC_ID
659 ; ASM: .long 0 # ParentScope
660 ; ASM: .long 4113 # FunctionType
661 ; ASM: .asciz "CharTypes" # Name
664662 ; ASM: .byte 242
665663 ; ASM: .byte 241
666664 ; ASM: # FuncId (0x1012) {
669667 ; ASM: # FunctionType: void () (0x1011)
670668 ; ASM: # Name: CharTypes
671669 ; ASM: # }
672 ; ASM: .short 26
673 ; ASM: .short 5637
674 ; ASM: .long 0
675 ; ASM: .asciz "D:\\src\\llvm\\build"
670 ; ASM: .short 26 # Record length
671 ; ASM: .short 5637 # Record kind: LF_STRING_ID
672 ; ASM: .long 0 # Id
673 ; ASM: .asciz "D:\\src\\llvm\\build" # StringData
676674 ; ASM: .byte 242
677675 ; ASM: .byte 241
678676 ; ASM: # StringId (0x1013) {
680678 ; ASM: # Id: 0x0
681679 ; ASM: # StringData: D:\src\llvm\build
682680 ; ASM: # }
683 ; ASM: .short 14
684 ; ASM: .short 5637
685 ; ASM: .long 0
686 ; ASM: .asciz "t.cpp"
681 ; ASM: .short 14 # Record length
682 ; ASM: .short 5637 # Record kind: LF_STRING_ID
683 ; ASM: .long 0 # Id
684 ; ASM: .asciz "t.cpp" # StringData
687685 ; ASM: .byte 242
688686 ; ASM: .byte 241
689687 ; ASM: # StringId (0x1014) {
691689 ; ASM: # Id: 0x0
692690 ; ASM: # StringData: t.cpp
693691 ; ASM: # }
694 ; ASM: .short 26
695 ; ASM: .short 5635
696 ; ASM: .short 5
697 ; ASM: .long 4115
698 ; ASM: .long 0
699 ; ASM: .long 4116
700 ; ASM: .long 0
701 ; ASM: .long 0
692 ; ASM: .short 26 # Record length
693 ; ASM: .short 5635 # Record kind: LF_BUILDINFO
694 ; ASM: .short 5 # NumArgs
695 ; ASM: .long 4115 # Argument
696 ; ASM: .long 0 # Argument
697 ; ASM: .long 4116 # Argument
698 ; ASM: .long 0 # Argument
699 ; ASM: .long 0 # Argument
702700 ; ASM: .byte 242
703701 ; ASM: .byte 241
704702 ; ASM: # BuildInfo (0x1015) {