llvm.org GIT mirror llvm / 028eab1
[codeview] Change readobj symbol dumping format Avoid duplicating DictScope with hand-written names everywhere. Print the S_-prefixed symbol kind for every record. This should make it easier to search for certain kinds of records when debugging PDB linking. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307732 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Kleckner 2 years ago
32 changed file(s) with 191 addition(s) and 236 deletion(s). Raw diff Collapse all Expand all
6161 };
6262 }
6363
64 static StringRef getSymbolKindName(SymbolKind Kind) {
65 switch (Kind) {
66 #define SYMBOL_RECORD(EnumName, EnumVal, Name) \
67 case EnumName: \
68 return #Name;
69 #include "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
70 default:
71 break;
72 }
73 return "UnknownSym";
74 }
75
6476 void CVSymbolDumperImpl::printLocalVariableAddrRange(
6577 const LocalVariableAddrRange &Range, uint32_t RelocationOffset) {
6678 DictScope S(W, "LocalVariableAddrRange");
8597 }
8698
8799 Error CVSymbolDumperImpl::visitSymbolBegin(CVSymbol &CVR) {
100 W.startLine() << getSymbolKindName(CVR.Type);
101 W.getOStream() << " {\n";
102 W.indent();
103 W.printEnum("Kind", unsigned(CVR.Type), getSymbolTypeNames());
88104 return Error::success();
89105 }
90106
91107 Error CVSymbolDumperImpl::visitSymbolEnd(CVSymbol &CVR) {
92108 if (PrintRecordBytes && ObjDelegate)
93109 ObjDelegate->printBinaryBlockWithRelocs("SymData", CVR.content());
110
111 W.unindent();
112 W.startLine() << "}\n";
94113 return Error::success();
95114 }
96115
97116 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR, BlockSym &Block) {
98 DictScope S(W, "BlockStart");
99
100117 StringRef LinkageName;
101118 W.printHex("PtrParent", Block.Parent);
102119 W.printHex("PtrEnd", Block.End);
112129 }
113130
114131 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR, Thunk32Sym &Thunk) {
115 DictScope S(W, "Thunk32");
116132 W.printNumber("Parent", Thunk.Parent);
117133 W.printNumber("End", Thunk.End);
118134 W.printNumber("Next", Thunk.Next);
125141
126142 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
127143 TrampolineSym &Tramp) {
128 DictScope S(W, "Trampoline");
129144 W.printEnum("Type", uint16_t(Tramp.Type), getTrampolineNames());
130145 W.printNumber("Size", Tramp.Size);
131146 W.printNumber("ThunkOff", Tramp.ThunkOffset);
136151 }
137152
138153 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR, SectionSym &Section) {
139 DictScope S(W, "Section");
140154 W.printNumber("SectionNumber", Section.SectionNumber);
141155 W.printNumber("Alignment", Section.Alignment);
142156 W.printNumber("Rva", Section.Rva);
151165
152166 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
153167 CoffGroupSym &CoffGroup) {
154 DictScope S(W, "COFF Group");
155168 W.printNumber("Size", CoffGroup.Size);
156169 W.printFlags("Characteristics", CoffGroup.Characteristics,
157170 getImageSectionCharacteristicNames(),
164177
165178 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
166179 BPRelativeSym &BPRel) {
167 DictScope S(W, "BPRelativeSym");
168
169180 W.printNumber("Offset", BPRel.Offset);
170181 printTypeIndex("Type", BPRel.Type);
171182 W.printString("VarName", BPRel.Name);
174185
175186 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
176187 BuildInfoSym &BuildInfo) {
177 DictScope S(W, "BuildInfo");
178
179188 W.printNumber("BuildId", BuildInfo.BuildId);
180189 return Error::success();
181190 }
182191
183192 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
184193 CallSiteInfoSym &CallSiteInfo) {
185 DictScope S(W, "CallSiteInfo");
186
187194 StringRef LinkageName;
188195 if (ObjDelegate) {
189196 ObjDelegate->printRelocatedField("CodeOffset",
199206
200207 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
201208 EnvBlockSym &EnvBlock) {
202 DictScope S(W, "EnvBlock");
203
204209 ListScope L(W, "Entries");
205210 for (auto Entry : EnvBlock.Fields) {
206211 W.printString(Entry);
210215
211216 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
212217 FileStaticSym &FileStatic) {
213 DictScope S(W, "FileStatic");
214218 printTypeIndex("Index", FileStatic.Index);
215219 W.printNumber("ModFilenameOffset", FileStatic.ModFilenameOffset);
216220 W.printFlags("Flags", uint16_t(FileStatic.Flags), getLocalFlagNames());
219223 }
220224
221225 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR, ExportSym &Export) {
222 DictScope S(W, "Export");
223226 W.printNumber("Ordinal", Export.Ordinal);
224227 W.printFlags("Flags", uint16_t(Export.Flags), getExportSymFlagNames());
225228 W.printString("Name", Export.Name);
228231
229232 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
230233 Compile2Sym &Compile2) {
231 DictScope S(W, "CompilerFlags2");
232
233234 W.printEnum("Language", Compile2.getLanguage(), getSourceLanguageNames());
234235 W.printFlags("Flags", Compile2.getFlags(), getCompileSym2FlagNames());
235236 W.printEnum("Machine", unsigned(Compile2.Machine), getCPUTypeNames());
253254
254255 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
255256 Compile3Sym &Compile3) {
256 DictScope S(W, "CompilerFlags3");
257
258257 W.printEnum("Language", Compile3.getLanguage(), getSourceLanguageNames());
259258 W.printFlags("Flags", Compile3.getFlags(), getCompileSym3FlagNames());
260259 W.printEnum("Machine", unsigned(Compile3.Machine), getCPUTypeNames());
280279
281280 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
282281 ConstantSym &Constant) {
283 DictScope S(W, "Constant");
284
285282 printTypeIndex("Type", Constant.Type);
286283 W.printNumber("Value", Constant.Value);
287284 W.printString("Name", Constant.Name);
289286 }
290287
291288 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR, DataSym &Data) {
292 DictScope S(W, "DataSym");
293
294 W.printEnum("Kind", uint16_t(CVR.kind()), getSymbolTypeNames());
295289 StringRef LinkageName;
296290 if (ObjDelegate) {
297291 ObjDelegate->printRelocatedField("DataOffset", Data.getRelocationOffset(),
307301 Error CVSymbolDumperImpl::visitKnownRecord(
308302 CVSymbol &CVR,
309303 DefRangeFramePointerRelFullScopeSym &DefRangeFramePointerRelFullScope) {
310 DictScope S(W, "DefRangeFramePointerRelFullScope");
311304 W.printNumber("Offset", DefRangeFramePointerRelFullScope.Offset);
312305 return Error::success();
313306 }
314307
315308 Error CVSymbolDumperImpl::visitKnownRecord(
316309 CVSymbol &CVR, DefRangeFramePointerRelSym &DefRangeFramePointerRel) {
317 DictScope S(W, "DefRangeFramePointerRel");
318
319310 W.printNumber("Offset", DefRangeFramePointerRel.Offset);
320311 printLocalVariableAddrRange(DefRangeFramePointerRel.Range,
321312 DefRangeFramePointerRel.getRelocationOffset());
325316
326317 Error CVSymbolDumperImpl::visitKnownRecord(
327318 CVSymbol &CVR, DefRangeRegisterRelSym &DefRangeRegisterRel) {
328 DictScope S(W, "DefRangeRegisterRel");
329
330319 W.printNumber("BaseRegister", DefRangeRegisterRel.Hdr.Register);
331320 W.printBoolean("HasSpilledUDTMember",
332321 DefRangeRegisterRel.hasSpilledUDTMember());
340329
341330 Error CVSymbolDumperImpl::visitKnownRecord(
342331 CVSymbol &CVR, DefRangeRegisterSym &DefRangeRegister) {
343 DictScope S(W, "DefRangeRegister");
344
345332 W.printNumber("Register", DefRangeRegister.Hdr.Register);
346333 W.printNumber("MayHaveNoName", DefRangeRegister.Hdr.MayHaveNoName);
347334 printLocalVariableAddrRange(DefRangeRegister.Range,
352339
353340 Error CVSymbolDumperImpl::visitKnownRecord(
354341 CVSymbol &CVR, DefRangeSubfieldRegisterSym &DefRangeSubfieldRegister) {
355 DictScope S(W, "DefRangeSubfieldRegister");
356
357342 W.printNumber("Register", DefRangeSubfieldRegister.Hdr.Register);
358343 W.printNumber("MayHaveNoName", DefRangeSubfieldRegister.Hdr.MayHaveNoName);
359344 W.printNumber("OffsetInParent", DefRangeSubfieldRegister.Hdr.OffsetInParent);
365350
366351 Error CVSymbolDumperImpl::visitKnownRecord(
367352 CVSymbol &CVR, DefRangeSubfieldSym &DefRangeSubfield) {
368 DictScope S(W, "DefRangeSubfield");
369
370353 if (ObjDelegate) {
371354 DebugStringTableSubsectionRef Strings = ObjDelegate->getStringTable();
372355 auto ExpectedProgram = Strings.getString(DefRangeSubfield.Program);
386369
387370 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
388371 DefRangeSym &DefRange) {
389 DictScope S(W, "DefRange");
390
391372 if (ObjDelegate) {
392373 DebugStringTableSubsectionRef Strings = ObjDelegate->getStringTable();
393374 auto ExpectedProgram = Strings.getString(DefRange.Program);
405386
406387 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
407388 FrameCookieSym &FrameCookie) {
408 DictScope S(W, "FrameCookie");
409
410389 StringRef LinkageName;
411390 if (ObjDelegate) {
412391 ObjDelegate->printRelocatedField("CodeOffset",
422401
423402 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
424403 FrameProcSym &FrameProc) {
425 DictScope S(W, "FrameProc");
426
427404 W.printHex("TotalFrameBytes", FrameProc.TotalFrameBytes);
428405 W.printHex("PaddingFrameBytes", FrameProc.PaddingFrameBytes);
429406 W.printHex("OffsetToPadding", FrameProc.OffsetToPadding);
439416
440417 Error CVSymbolDumperImpl::visitKnownRecord(
441418 CVSymbol &CVR, HeapAllocationSiteSym &HeapAllocSite) {
442 DictScope S(W, "HeapAllocationSite");
443
444419 StringRef LinkageName;
445420 if (ObjDelegate) {
446421 ObjDelegate->printRelocatedField("CodeOffset",
457432
458433 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
459434 InlineSiteSym &InlineSite) {
460 DictScope S(W, "InlineSite");
461
462435 W.printHex("PtrParent", InlineSite.Parent);
463436 W.printHex("PtrEnd", InlineSite.End);
464437 printTypeIndex("Inlinee", InlineSite.Inlinee);
514487
515488 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
516489 RegisterSym &Register) {
517 DictScope S(W, "RegisterSym");
518490 printTypeIndex("Type", Register.Index);
519491 W.printEnum("Seg", uint16_t(Register.Register), getRegisterNames());
520492 W.printString("Name", Register.Name);
522494 }
523495
524496 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR, PublicSym32 &Public) {
525 DictScope S(W, "PublicSym");
526497 W.printFlags("Flags", uint32_t(Public.Flags), getPublicSymFlagNames());
527498 W.printNumber("Seg", Public.Segment);
528499 W.printNumber("Off", Public.Offset);
531502 }
532503
533504 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR, ProcRefSym &ProcRef) {
534 DictScope S(W, "ProcRef");
535505 W.printNumber("SumName", ProcRef.SumName);
536506 W.printNumber("SymOffset", ProcRef.SymOffset);
537507 W.printNumber("Mod", ProcRef.Module);
540510 }
541511
542512 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR, LabelSym &Label) {
543 DictScope S(W, "Label");
544
545513 StringRef LinkageName;
546514 if (ObjDelegate) {
547515 ObjDelegate->printRelocatedField("CodeOffset", Label.getRelocationOffset(),
557525 }
558526
559527 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR, LocalSym &Local) {
560 DictScope S(W, "Local");
561
562528 printTypeIndex("Type", Local.Type);
563529 W.printFlags("Flags", uint16_t(Local.Flags), getLocalFlagNames());
564530 W.printString("VarName", Local.Name);
566532 }
567533
568534 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR, ObjNameSym &ObjName) {
569 DictScope S(W, "ObjectName");
570
571535 W.printHex("Signature", ObjName.Signature);
572536 W.printString("ObjectName", ObjName.Name);
573537 return Error::success();
574538 }
575539
576540 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR, ProcSym &Proc) {
577 DictScope S(W, "ProcStart");
578
579541 if (InFunctionScope)
580542 return llvm::make_error(
581543 "Visiting a ProcSym while inside function scope!");
583545 InFunctionScope = true;
584546
585547 StringRef LinkageName;
586 W.printEnum("Kind", uint16_t(CVR.kind()), getSymbolTypeNames());
587548 W.printHex("PtrParent", Proc.Parent);
588549 W.printHex("PtrEnd", Proc.End);
589550 W.printHex("PtrNext", Proc.Next);
606567
607568 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
608569 ScopeEndSym &ScopeEnd) {
609 if (CVR.kind() == SymbolKind::S_END)
610 DictScope S(W, "BlockEnd");
611 else if (CVR.kind() == SymbolKind::S_PROC_ID_END)
612 DictScope S(W, "ProcEnd");
613 else if (CVR.kind() == SymbolKind::S_INLINESITE_END)
614 DictScope S(W, "InlineSiteEnd");
615
616570 InFunctionScope = false;
617571 return Error::success();
618572 }
626580
627581 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
628582 RegRelativeSym &RegRel) {
629 DictScope S(W, "RegRelativeSym");
630
631583 W.printHex("Offset", RegRel.Offset);
632584 printTypeIndex("Type", RegRel.Type);
633585 W.printEnum("Register", uint16_t(RegRel.Register), getRegisterNames());
637589
638590 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR,
639591 ThreadLocalDataSym &Data) {
640 DictScope S(W, "ThreadLocalDataSym");
641
642592 StringRef LinkageName;
643593 if (ObjDelegate) {
644594 ObjDelegate->printRelocatedField("DataOffset", Data.getRelocationOffset(),
652602 }
653603
654604 Error CVSymbolDumperImpl::visitKnownRecord(CVSymbol &CVR, UDTSym &UDT) {
655 DictScope S(W, "UDT");
656605 printTypeIndex("Type", UDT.Type);
657606 W.printString("UDTName", UDT.Name);
658607 return Error::success();
659608 }
660609
661610 Error CVSymbolDumperImpl::visitUnknownSymbol(CVSymbol &CVR) {
662 DictScope S(W, "UnknownSym");
663 W.printEnum("Kind", uint16_t(CVR.kind()), getSymbolTypeNames());
664611 W.printNumber("Length", CVR.length());
665612 return Error::success();
666613 }
3434 ; OBJ32: CodeViewDebugInfo [
3535 ; OBJ32: Subsection [
3636 ; OBJ32-NEXT: SubSectionType: Symbols (0xF1)
37 ; OBJ32: ProcStart {
37 ; OBJ32: {{.*}}Proc{{.*}}Sym {
3838 ; OBJ32: CodeSize: 0x6
3939 ; OBJ32: DisplayName: f
4040 ; OBJ32: LinkageName: _f
9393 ; OBJ64: ]
9494 ; OBJ64: Subsection [
9595 ; OBJ64-NEXT: SubSectionType: Symbols (0xF1)
96 ; OBJ64: ProcStart {
96 ; OBJ64: {{.*}}Proc{{.*}}Sym {
9797 ; OBJ64: CodeSize: 0xE
9898 ; OBJ64: DisplayName: f
9999 ; OBJ64: LinkageName: f
100100 ; OBJ64: }
101101 ; OBJ64-NEXT: ProcEnd {
102 ; OBJ64-NEXT: }
102 ; OBJ64: }
103103 ; OBJ64-NEXT: ]
104104 ; OBJ64: FunctionLineTable [
105105 ; OBJ64-NEXT: Name: f
1111 ; fn_tmpl();
1212 ; }
1313
14 ; CHECK: ProcStart {
14 ; CHECK: {{.*}}Proc{{.*}}Sym {
1515 ; CHECK: FunctionType: bar ({{.*}})
1616 ; CHECK: DisplayName: foo::bar{{$}}
1717 ; CHECK-NEXT: LinkageName: ?bar@foo@@YAHH@Z
1818
19 ; CHECK: ProcStart {
19 ; CHECK: {{.*}}Proc{{.*}}Sym {
2020 ; CHECK: FunctionType: fn_tmpl ({{.*}})
2121 ; CHECK: DisplayName: foo::fn_tmpl
2222 ; CHECK-NEXT: LinkageName: ??$fn_tmpl@H$1?bar@foo@@YAHH@Z@foo@@YAXXZ
1010 }
1111
1212 ; ASM: .cv_def_range Lfunc_begin0 Lfunc_end0, "A\021\200\000\000\000"
13 ; OBJ: DefRangeRegister {
13 ; OBJ: DefRangeRegisterSym {
1414 ; OBJ: Register: 128
1515 ; OBJ: MayHaveNoName: 0
1616 ; OBJ: LocalVariableAddrRange {
8080 ; OBJ: DisplayName: first
8181 ; OBJ: LinkageName: ?first@@3HA
8282 ; OBJ: }
83 ; OBJ: ThreadLocalDataSym {
83 ; OBJ: GlobalTLS {
8484 ; OBJ: DataOffset: ?middle@@3PEBHEB+0x0
8585 ; OBJ: Type: const int* (0x1001)
8686 ; OBJ: DisplayName: middle
8787 ; OBJ: LinkageName: ?middle@@3PEBHEB
8888 ; OBJ: }
89 ; OBJ: DataSym {
89 ; OBJ: GlobalData {
9090 ; OBJ: Kind: S_GDATA32 (0x110D)
9191 ; OBJ: DataOffset: ?last@@3HA+0x0
9292 ; OBJ: Type: int (0x74)
100100 ; OBJ: Magic: 0x4
101101 ; OBJ: Subsection [
102102 ; OBJ: SubSectionType: Symbols (0xF1)
103 ; OBJ: DataSym {
103 ; OBJ: GlobalData {
104104 ; OBJ: DataOffset: ?comdat@?$A@X@@2HB+0x0
105105 ; OBJ: Type: const int (0x1000)
106106 ; OBJ: DisplayName: comdat
1717
1818 ; OBJ: Subsection [
1919 ; OBJ: SubSectionType: Symbols (0xF1)
20 ; OBJ: ProcStart {
20 ; OBJ: {{.*}}Proc{{.*}}Sym {
2121 ; OBJ: DisplayName: f
2222 ; OBJ: }
23 ; OBJ: InlineSite {
23 ; OBJ: InlineSiteSym {
2424 ; OBJ: PtrParent: 0x0
2525 ; OBJ: PtrEnd: 0x0
2626 ; OBJ: Inlinee: file_change (0x1002)
6262
6363 ; OBJ: Subsection [
6464 ; OBJ: SubSectionType: Symbols (0xF1)
65 ; OBJ: ProcStart {
65 ; OBJ: {{.*}}Proc{{.*}}Sym {
6666 ; OBJ: Kind: S_GPROC32_ID (0x1147)
6767 ; OBJ: FunctionType: main (0x1005)
6868 ; OBJ: CodeOffset: _main+0x0
7373 ; OBJ: LinkageName: _main
7474 ; OBJ: }
7575
76 ; Previously, g's InlineSite referenced t.h, which was wasteful.
77 ; OBJ: InlineSite {
76 ; Previously, g's InlineSiteSym referenced t.h, which was wasteful.
77 ; OBJ: InlineSiteSym {
7878 ; OBJ: Inlinee: g (0x1002)
7979 ; OBJ: BinaryAnnotations [
8080 ; OBJ-NEXT: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x6, LineOffset: 1}
8484 ; OBJ-NEXT: ]
8585 ; OBJ: }
8686
87 ; OBJ: InlineSite {
87 ; OBJ: InlineSiteSym {
8888 ; OBJ: Inlinee: f (0x1003)
8989 ; OBJ: BinaryAnnotations [
9090 ; OBJ-NEXT: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0xD, LineOffset: 1}
1717
1818 ; OBJ: Subsection [
1919 ; OBJ: SubSectionType: Symbols (0xF1)
20 ; OBJ: ProcStart {
21 ; OBJ: InlineSite {
20 ; OBJ: {{.*}}Proc{{.*}}Sym {
21 ; OBJ: InlineSiteSym {
2222 ; OBJ: Inlinee: h (0x1002)
2323 ; OBJ: }
24 ; OBJ: InlineSite {
24 ; OBJ: InlineSiteSym {
2525 ; OBJ: Inlinee: g (0x1003)
2626 ; OBJ: }
27 ; OBJ: InlineSite {
27 ; OBJ: InlineSiteSym {
2828 ; OBJ: Inlinee: f (0x1004)
2929 ; OBJ: }
3030 ; OBJ: InlineSiteEnd {
1313 ; CHECK: CodeViewDebugInfo [
1414 ; CHECK: Section: .debug$S
1515 ; CHECK: Subsection [
16 ; CHECK: ProcStart {
16 ; CHECK: {{.*}}Proc{{.*}}Sym {
1717 ; CHECK: DisplayName: main
1818 ; CHECK: }
19 ; CHECK: InlineSite {
19 ; CHECK: InlineSiteSym {
2020 ; CHECK: Inlinee: same_name (0x1002)
2121 ; CHECK: }
2222 ; CHECK: InlineSiteEnd {
2323 ; CHECK: }
24 ; CHECK: InlineSite {
24 ; CHECK: InlineSiteSym {
2525 ; CHECK: Inlinee: same_name (0x1002)
2626 ; CHECK: }
2727 ; CHECK: InlineSiteEnd {
165165 ; OBJ: ]
166166 ; OBJ: Subsection [
167167 ; OBJ: SubSectionType: Symbols (0xF1)
168 ; OBJ: ProcStart {
168 ; OBJ: {{.*}}Proc{{.*}}Sym {
169169 ; OBJ: PtrParent: 0x0
170170 ; OBJ: PtrEnd: 0x0
171171 ; OBJ: PtrNext: 0x0
180180 ; OBJ: DisplayName: baz
181181 ; OBJ: LinkageName: ?baz@@YAXXZ
182182 ; OBJ: }
183 ; OBJ: InlineSite {
183 ; OBJ: InlineSiteSym {
184184 ; OBJ: PtrParent: 0x0
185185 ; OBJ: PtrEnd: 0x0
186186 ; OBJ: Inlinee: bar (0x1002)
192192 ; OBJ-NEXT: ChangeCodeLength: 0x7
193193 ; OBJ: ]
194194 ; OBJ: }
195 ; OBJ: InlineSite {
195 ; OBJ: InlineSiteSym {
196196 ; OBJ: PtrParent: 0x0
197197 ; OBJ: PtrEnd: 0x0
198198 ; OBJ: Inlinee: foo (0x1003)
44 ; DW_ATE_[un]signed encoding for all integer types if they don't have distinct
55 ; integer types for characters types. This was PR30552.
66
7 ; CHECK-LABEL: DataSym {
7 ; CHECK-LABEL: GlobalData {
88 ; CHECK-NEXT: Kind: S_GDATA32 (0x110D)
99 ; CHECK-NEXT: DataOffset:
1010 ; CHECK-NEXT: Type: signed char (0x10)
1212 ; CHECK-NEXT: LinkageName: x
1313 ; CHECK-NEXT: }
1414
15 ; CHECK-LABEL: DataSym {
15 ; CHECK-LABEL: GlobalData {
1616 ; CHECK-NEXT: Kind: S_GDATA32 (0x110D)
1717 ; CHECK-NEXT: DataOffset:
1818 ; CHECK-NEXT: Type: unsigned char (0x20)
1010
1111 ; FIXME: Find a way to describe variables optimized to constants.
1212
13 ; OBJ: ProcStart {
13 ; OBJ: {{.*}}Proc{{.*}}Sym {
1414 ; OBJ: DisplayName: constant_var
1515 ; OBJ: }
16 ; OBJ: Local {
16 ; OBJ: LocalSym {
17 ; OBJ-NEXT: Kind:
1718 ; OBJ-NEXT: Type: int (0x74)
1819 ; OBJ-NEXT: Flags [ (0x100)
1920 ; OBJ-NEXT: IsOptimizedOut (0x100)
6565 ; ASM: .short 2 # Record length
6666 ; ASM: .short 4431 # Record kind: S_PROC_ID_END
6767
68 ; OBJ: Local {
68 ; OBJ: LocalSym {
6969 ; OBJ: Type: int (0x74)
7070 ; OBJ: VarName: p
7171 ; OBJ: }
72 ; OBJ-NOT: Local {
73 ; OBJ: DefRangeRegister {
72 ; OBJ-NOT: LocalSym {
73 ; OBJ: DefRangeRegisterSym {
74 ; OBJ-NEXT: Kind:
7475 ; OBJ-NEXT: Register: 23
7576 ; OBJ-NEXT: MayHaveNoName: 0
7677 ; OBJ-NEXT: LocalVariableAddrRange {
9898
9999 ; OBJ: Subsection [
100100 ; OBJ: SubSectionType: Symbols (0xF1)
101 ; OBJ: ProcStart {
101 ; OBJ: {{.*}}Proc{{.*}}Sym {
102102 ; OBJ: DisplayName: f
103103 ; OBJ: LinkageName: f
104104 ; OBJ: }
105 ; OBJ: Local {
105 ; OBJ: LocalSym {
106106 ; OBJ: Type: int (0x74)
107107 ; OBJ: Flags [ (0x1)
108108 ; OBJ: IsParameter (0x1)
109109 ; OBJ: ]
110110 ; OBJ: VarName: param
111111 ; OBJ: }
112 ; OBJ: DefRangeRegisterRel {
112 ; OBJ: DefRangeRegisterRelSym {
113113 ; OBJ: BaseRegister: 335
114114 ; OBJ: HasSpilledUDTMember: No
115115 ; OBJ: OffsetInParent: 0
120120 ; OBJ: Range: 0x4F
121121 ; OBJ: }
122122 ; OBJ: }
123 ; OBJ: Local {
123 ; OBJ: LocalSym {
124124 ; OBJ: Type: int (0x74)
125125 ; OBJ: Flags [ (0x0)
126126 ; OBJ: ]
127127 ; OBJ: VarName: a
128128 ; OBJ: }
129 ; OBJ: DefRangeRegisterRel {
129 ; OBJ: DefRangeRegisterRelSym {
130130 ; OBJ: BaseRegister: 335
131131 ; OBJ: HasSpilledUDTMember: No
132132 ; OBJ: OffsetInParent: 0
137137 ; OBJ: Range: 0x21
138138 ; OBJ: }
139139 ; OBJ: }
140 ; OBJ: Local {
140 ; OBJ: LocalSym {
141141 ; OBJ: Type: int (0x74)
142142 ; OBJ: Flags [ (0x0)
143143 ; OBJ: ]
144144 ; OBJ: VarName: b
145145 ; OBJ: }
146 ; OBJ: DefRangeRegisterRel {
146 ; OBJ: DefRangeRegisterRelSym {
147147 ; OBJ: BaseRegister: 335
148148 ; OBJ: HasSpilledUDTMember: No
149149 ; OBJ: OffsetInParent: 0
154154 ; OBJ: Range: 0x1F
155155 ; OBJ: }
156156 ; OBJ: }
157 ; OBJ: InlineSite {
157 ; OBJ: InlineSiteSym {
158158 ; OBJ: PtrParent: 0x0
159159 ; OBJ: PtrEnd: 0x0
160160 ; OBJ: Inlinee: will_be_inlined (0x1002)
165165 ; OBJ: ChangeCodeLength: 0xC
166166 ; OBJ: ]
167167 ; OBJ: }
168 ; OBJ: Local {
168 ; OBJ: LocalSym {
169169 ; OBJ: Type: int (0x74)
170170 ; OBJ: Flags [ (0x0)
171171 ; OBJ: ]
172172 ; OBJ: VarName: v
173173 ; OBJ: }
174 ; OBJ: DefRangeRegisterRel {
174 ; OBJ: DefRangeRegisterRelSym {
175175 ; OBJ: BaseRegister: 335
176176 ; OBJ: HasSpilledUDTMember: No
177177 ; OBJ: OffsetInParent: 0
184184 ; OBJ: }
185185 ; OBJ: InlineSiteEnd {
186186 ; OBJ: }
187 ; OBJ: InlineSite {
187 ; OBJ: InlineSiteSym {
188188 ; OBJ: PtrParent: 0x0
189189 ; OBJ: PtrEnd: 0x0
190190 ; OBJ: Inlinee: will_be_inlined (0x1002)
195195 ; OBJ: ChangeCodeLength: 0xA
196196 ; OBJ: ]
197197 ; OBJ: }
198 ; OBJ: Local {
198 ; OBJ: LocalSym {
199199 ; OBJ: Type: int (0x74)
200200 ; OBJ: Flags [ (0x0)
201201 ; OBJ: ]
202202 ; OBJ: VarName: v
203203 ; OBJ: }
204 ; OBJ: DefRangeRegisterRel {
204 ; OBJ: DefRangeRegisterRelSym {
205205 ; OBJ: BaseRegister: 335
206206 ; OBJ: HasSpilledUDTMember: No
207207 ; OBJ: OffsetInParent: 0
0 ; RUN: llc < %s -filetype=obj | llvm-readobj -codeview | FileCheck %s
11
2 ; CHECK: ProcStart {
2 ; CHECK: {{.*}}Proc{{.*}}Sym {
33 ; CHECK: Kind: S_GPROC32_ID (0x1147)
44 ; CHECK: FunctionType: {{A+}} (0x1002)
55 ; CHECK: CodeOffset: f+0x0
4242 ; OBJ32: ]
4343 ; OBJ32: Subsection [
4444 ; OBJ32-NEXT: SubSectionType: Symbols (0xF1)
45 ; OBJ32: ProcStart {
45 ; OBJ32: {{.*}}Proc{{.*}}Sym {
4646 ; OBJ32: CodeSize: 0x10
4747 ; OBJ32: DisplayName: f
4848 ; OBJ32: LinkageName: _f
4949 ; OBJ32: }
5050 ; OBJ32-NEXT: ProcEnd {
51 ; OBJ32-NEXT: }
51 ; OBJ32: }
5252 ; OBJ32-NEXT: ]
5353 ; OBJ32: FunctionLineTable [
5454 ; OBJ32-NEXT: Name: _f
114114 ; OBJ64: ]
115115 ; OBJ64: Subsection [
116116 ; OBJ64-NEXT: SubSectionType: Symbols (0xF1)
117 ; OBJ64: ProcStart {
117 ; OBJ64: {{.*}}Proc{{.*}}Sym {
118118 ; OBJ64: CodeSize: 0x18
119119 ; OBJ64: DisplayName: f
120120 ; OBJ64: LinkageName: f
121121 ; OBJ64: }
122122 ; OBJ64-NEXT: ProcEnd {
123 ; OBJ64-NEXT: }
123 ; OBJ64: }
124124 ; OBJ64-NEXT: ]
125125 ; OBJ64: FunctionLineTable [
126126 ; OBJ64-NEXT: Name: f
144144 ; OBJ32: ]
145145 ; OBJ32: Subsection [
146146 ; OBJ32-NEXT: SubSectionType: Symbols (0xF1)
147 ; OBJ32: ProcStart {
147 ; OBJ32: {{.*}}Proc{{.*}}Sym {
148148 ; OBJ32: Kind: S_LPROC32_ID (0x1146)
149149 ; OBJ32: CodeSize: 0x6
150150 ; OBJ32: DisplayName: x
158158 ; OBJ32: ]
159159 ; OBJ32: Subsection [
160160 ; OBJ32-NEXT: SubSectionType: Symbols (0xF1)
161 ; OBJ32: ProcStart {
161 ; OBJ32: {{.*}}Proc{{.*}}Sym {
162162 ; OBJ32: Kind: S_GPROC32_ID (0x1147)
163163 ; OBJ32: CodeSize: 0x6
164164 ; OBJ32: DisplayName: y
172172 ; OBJ32: ]
173173 ; OBJ32: Subsection [
174174 ; OBJ32-NEXT: SubSectionType: Symbols (0xF1)
175 ; OBJ32: ProcStart {
175 ; OBJ32: {{.*}}Proc{{.*}}Sym {
176176 ; OBJ32: Kind: S_GPROC32_ID (0x1147)
177177 ; OBJ32: CodeSize: 0x10
178178 ; OBJ32: DisplayName: f
418418 ; OBJ64-NEXT: ]
419419 ; OBJ64: Subsection [
420420 ; OBJ64-NEXT: SubSectionType: Symbols (0xF1)
421 ; OBJ64: ProcStart {
421 ; OBJ64: {{.*}}Proc{{.*}}Sym {
422422 ; OBJ64: Kind: S_LPROC32_ID (0x1146)
423423 ; OBJ64: CodeSize: 0xE
424424 ; OBJ64: DisplayName: x
432432 ; OBJ64: ]
433433 ; OBJ64: Subsection [
434434 ; OBJ64-NEXT: SubSectionType: Symbols (0xF1)
435 ; OBJ64: ProcStart {
435 ; OBJ64: {{.*}}Proc{{.*}}Sym {
436436 ; OBJ64: Kind: S_GPROC32_ID (0x1147)
437437 ; OBJ64: CodeSize: 0xE
438438 ; OBJ64: DisplayName: y
446446 ; OBJ64: ]
447447 ; OBJ64: Subsection [
448448 ; OBJ64-NEXT: SubSectionType: Symbols (0xF1)
449 ; OBJ64: ProcStart {
449 ; OBJ64: {{.*}}Proc{{.*}}Sym {
450450 ; OBJ64: Kind: S_GPROC32_ID (0x1147)
451451 ; OBJ64: CodeSize: 0x18
452452 ; OBJ64: DisplayName: f
104104 ; ASM: .cv_def_range [[oy_start]] [[oy_end]], "C\021\027\000\000\000\004\000\000\000"
105105
106106
107 ; OBJ-LABEL: ProcStart {
107 ; OBJ-LABEL: {{.*}}Proc{{.*}}Sym {
108108 ; OBJ: Kind: S_GPROC32_ID (0x1147)
109109 ; OBJ: DisplayName: loop_csr
110110 ; OBJ: }
111 ; OBJ: Local {
111 ; OBJ: LocalSym {
112112 ; OBJ: VarName: o
113113 ; OBJ: }
114 ; OBJ: DefRangeSubfieldRegister {
114 ; OBJ: DefRangeSubfieldRegisterSym {
115115 ; OBJ: Register: 24
116116 ; OBJ: MayHaveNoName: 0
117117 ; OBJ: OffsetInParent: 0
118118 ; OBJ: LocalVariableAddrRange {
119119 ; OBJ: }
120120 ; OBJ: }
121 ; OBJ: DefRangeSubfieldRegister {
121 ; OBJ: DefRangeSubfieldRegisterSym {
122122 ; OBJ: Register: 23
123123 ; OBJ: MayHaveNoName: 0
124124 ; OBJ: OffsetInParent: 4
134134 ; ASM: .asciz "o"
135135 ; ASM: .cv_def_range .Lfunc_begin1 .Lfunc_end1, "C\021\022\000\000\000\004\000\000\000"
136136
137 ; OBJ-LABEL: ProcStart {
137 ; OBJ-LABEL: {{.*}}Proc{{.*}}Sym {
138138 ; OBJ: Kind: S_GPROC32_ID (0x1147)
139139 ; OBJ: DisplayName: pad_right
140140 ; OBJ: }
141 ; OBJ: Local {
141 ; OBJ: LocalSym {
142142 ; OBJ: VarName: o
143143 ; OBJ: }
144 ; OBJ: DefRangeSubfieldRegister {
144 ; OBJ: DefRangeSubfieldRegisterSym {
145145 ; OBJ: Register: 18
146146 ; OBJ: MayHaveNoName: 0
147147 ; OBJ: OffsetInParent: 4
157157 ; ASM: .asciz "o"
158158 ; ASM: .cv_def_range .Lfunc_begin2 .Lfunc_end2, "C\021\022\000\000\000\000\000\000\000"
159159
160 ; OBJ-LABEL: ProcStart {
160 ; OBJ-LABEL: {{.*}}Proc{{.*}}Sym {
161161 ; OBJ: Kind: S_GPROC32_ID (0x1147)
162162 ; OBJ: DisplayName: pad_left
163163 ; OBJ: }
164 ; OBJ: Local {
164 ; OBJ: LocalSym {
165165 ; OBJ: VarName: o
166166 ; OBJ: }
167 ; OBJ: DefRangeSubfieldRegister {
167 ; OBJ: DefRangeSubfieldRegisterSym {
168168 ; OBJ: Register: 18
169169 ; OBJ: MayHaveNoName: 0
170170 ; OBJ: OffsetInParent: 0
184184 ; ASM: .asciz "p"
185185 ; ASM: .cv_def_range [[p_start]] .Lfunc_end3, "C\021\021\000\000\000\004\000\000\000"
186186
187 ; OBJ-LABEL: ProcStart {
187 ; OBJ-LABEL: {{.*}}Proc{{.*}}Sym {
188188 ; OBJ: Kind: S_GPROC32_ID (0x1147)
189189 ; OBJ: DisplayName: nested
190190 ; OBJ: }
191 ; OBJ: Local {
191 ; OBJ: LocalSym {
192192 ; OBJ: VarName: o
193193 ; OBJ: }
194 ; OBJ: Local {
194 ; OBJ: LocalSym {
195195 ; OBJ: VarName: p
196196 ; OBJ: }
197 ; OBJ: DefRangeSubfieldRegister {
197 ; OBJ: DefRangeSubfieldRegisterSym {
198198 ; OBJ: Register: 17
199199 ; OBJ: MayHaveNoName: 0
200200 ; OBJ: OffsetInParent: 4
211211 ; ASM: .asciz "o"
212212 ; ASM: .cv_def_range [[spill_o_x_start]] [[spill_o_x_end]], "E\021O\001A\000$\000\000\000"
213213
214 ; OBJ-LABEL: ProcStart {
214 ; OBJ-LABEL: {{.*}}Proc{{.*}}Sym {
215215 ; OBJ: Kind: S_GPROC32_ID (0x1147)
216216 ; OBJ: DisplayName: bitpiece_spill
217217 ; OBJ: }
218 ; OBJ: Local {
218 ; OBJ: LocalSym {
219219 ; OBJ: VarName: o
220220 ; OBJ: }
221 ; OBJ: DefRangeRegisterRel {
221 ; OBJ: DefRangeRegisterRelSym {
222222 ; OBJ: BaseRegister: 335
223223 ; OBJ: HasSpilledUDTMember: Yes
224224 ; OBJ: OffsetInParent: 4
8080
8181 ; OBJ: Subsection [
8282 ; OBJ: SubSectionType: Symbols (0xF1)
83 ; OBJ: ProcStart {
83 ; OBJ: {{.*}}Proc{{.*}}Sym {
8484 ; OBJ: DisplayName: f
8585 ; OBJ: }
86 ; OBJ: Local {
86 ; OBJ: LocalSym {
8787 ; OBJ: Type: int (0x74)
8888 ; OBJ: Flags [ (0x1)
8989 ; OBJ: IsParameter (0x1)
9090 ; OBJ: ]
9191 ; OBJ: VarName: p
9292 ; OBJ: }
93 ; OBJ: DefRangeRegister {
93 ; OBJ: DefRangeRegisterSym {
9494 ; OBJ: Register: 18
9595 ; OBJ: LocalVariableAddrRange {
9696 ; OBJ: OffsetStart: .text+0x0
9898 ; OBJ: Range: 0x7
9999 ; OBJ: }
100100 ; OBJ: }
101 ; OBJ: DefRangeRegister {
101 ; OBJ: DefRangeRegisterSym {
102102 ; OBJ: Register: 23
103103 ; OBJ: LocalVariableAddrRange {
104104 ; OBJ: OffsetStart: .text+0x7
106106 ; OBJ: Range: 0x18
107107 ; OBJ: }
108108 ; OBJ: }
109 ; OBJ: Local {
109 ; OBJ: LocalSym {
110110 ; OBJ: Type: int (0x74)
111111 ; OBJ: Flags [ (0x0)
112112 ; OBJ: ]
113113 ; OBJ: VarName: a
114114 ; OBJ: }
115 ; OBJ: DefRangeRegister {
115 ; OBJ: DefRangeRegisterSym {
116116 ; OBJ: Register: 17
117117 ; OBJ: LocalVariableAddrRange {
118118 ; OBJ: OffsetStart: .text+0xC
120120 ; OBJ: Range: 0x6
121121 ; OBJ: }
122122 ; OBJ: }
123 ; OBJ: Local {
123 ; OBJ: LocalSym {
124124 ; OBJ: Type: int (0x74)
125125 ; OBJ: Flags [ (0x0)
126126 ; OBJ: ]
127127 ; OBJ: VarName: c
128128 ; OBJ: }
129 ; OBJ: DefRangeRegister {
129 ; OBJ: DefRangeRegisterSym {
130130 ; OBJ: Register: 17
131131 ; OBJ: LocalVariableAddrRange {
132132 ; OBJ: OffsetStart: .text+0xC
134134 ; OBJ: Range: 0x4
135135 ; OBJ: }
136136 ; OBJ: }
137 ; OBJ: Local {
137 ; OBJ: LocalSym {
138138 ; OBJ: Type: int (0x74)
139139 ; OBJ: Flags [ (0x0)
140140 ; OBJ: ]
141141 ; OBJ: VarName: b
142142 ; OBJ: }
143 ; OBJ: DefRangeRegister {
143 ; OBJ: DefRangeRegisterSym {
144144 ; OBJ: Register: 17
145145 ; OBJ: MayHaveNoName: 0
146146 ; OBJ: OffsetStart: .text+0x12
148148 ; OBJ: Range: 0x6
149149 ; OBJ: }
150150 ; OBJ: }
151 ; OBJ: InlineSite {
151 ; OBJ: InlineSiteSym {
152152 ; OBJ: PtrParent: 0x0
153153 ; OBJ: PtrEnd: 0x0
154154 ; OBJ: Inlinee: inlineinc (0x1002)
155155 ; OBJ: }
156 ; OBJ: Local {
156 ; OBJ: LocalSym {
157157 ; OBJ: Type: int (0x74)
158158 ; OBJ: Flags [ (0x1)
159159 ; OBJ: IsParameter (0x1)
160160 ; OBJ: ]
161161 ; OBJ: VarName: a
162162 ; OBJ: }
163 ; OBJ: DefRangeRegister {
163 ; OBJ: DefRangeRegisterSym {
164164 ; OBJ: Register: 17
165165 ; OBJ: LocalVariableAddrRange {
166166 ; OBJ: OffsetStart: .text+0xC
168168 ; OBJ: Range: 0x6
169169 ; OBJ: }
170170 ; OBJ: }
171 ; OBJ: Local {
171 ; OBJ: LocalSym {
172172 ; OBJ: Type: int (0x74)
173173 ; OBJ: Flags [ (0x0)
174174 ; OBJ: ]
175175 ; OBJ: VarName: b
176176 ; OBJ: }
177 ; OBJ: DefRangeRegister {
177 ; OBJ: DefRangeRegisterSym {
178178 ; OBJ: Register: 17
179179 ; OBJ: LocalVariableAddrRange {
180180 ; OBJ: OffsetStart: .text+0x12
7676 ; OBJ32-NEXT: ]
7777 ; OBJ32: Subsection [
7878 ; OBJ32-NEXT: SubSectionType: Symbols (0xF1)
79 ; OBJ32: ProcStart {
79 ; OBJ32: {{.*}}Proc{{.*}}Sym {
8080 ; OBJ32: CodeSize: 0x6
8181 ; OBJ32: DisplayName: f
8282 ; OBJ32: LinkageName: _f
8383 ; OBJ32: }
8484 ; OBJ32-NEXT: ProcEnd {
85 ; OBJ32-NEXT: }
85 ; OBJ32: }
8686 ; OBJ32-NEXT: ]
8787 ; OBJ32: FunctionLineTable [
8888 ; OBJ32-NEXT: Name: _f
173173 ; OBJ64-NEXT: ]
174174 ; OBJ64: Subsection [
175175 ; OBJ64-NEXT: SubSectionType: Symbols (0xF1)
176 ; OBJ64: ProcStart {
176 ; OBJ64: {{.*}}Proc{{.*}}Sym {
177177 ; OBJ64: CodeSize: 0xE
178178 ; OBJ64: DisplayName: f
179179 ; OBJ64: LinkageName: f
180180 ; OBJ64: }
181181 ; OBJ64-NEXT: ProcEnd {
182 ; OBJ64-NEXT: }
182 ; OBJ64: }
183183 ; OBJ64-NEXT: ]
184184 ; OBJ64: FunctionLineTable [
185185 ; OBJ64-NEXT: Name: f
11
22 ; CHECK: CodeViewDebugInfo [
33 ; CHECK: Subsection [
4 ; CHECK: Local {
4 ; CHECK: LocalSym {
55 ; CHECK: Type: wchar_t (0x71)
66 ; CHECK: Flags [ (0x0)
77 ; CHECK: ]
99 ; CHECK: }
1010 ; CHECK: Subsection [
1111 ; CHECK: SubSectionType: Symbols (0xF1)
12 ; CHECK: UDT {
12 ; CHECK: UDTSym {
1313 ; CHECK: Type: wchar_t (0x71)
1414 ; CHECK: UDTName: XYZ
1515 ; CHECK: }
4545 ; CHECK: Magic: 0x4
4646 ; CHECK: Subsection [
4747 ; CHECK: SubSectionType: Symbols (0xF1)
48 ; CHECK: ProcStart {
48 ; CHECK: {{.*}}Proc{{.*}}Sym {
4949 ; CHECK: PtrParent: 0x0
5050 ; CHECK: PtrEnd: 0x0
5151 ; CHECK: PtrNext: 0x0
6060 ; CHECK: DisplayName: f
6161 ; CHECK: LinkageName: ?f@@YAXXZ
6262 ; CHECK: }
63 ; CHECK: Local {
63 ; CHECK: LocalSym {
6464 ; CHECK: Type: 0x1003
6565 ; CHECK: Flags [ (0x0)
6666 ; CHECK: ]
6767 ; CHECK: VarName: a
6868 ; CHECK: }
69 ; CHECK: DefRangeRegisterRel {
69 ; CHECK: DefRangeRegisterRelSym {
7070 ; CHECK: BaseRegister: 22
7171 ; CHECK: HasSpilledUDTMember: No
7272 ; CHECK: OffsetInParent: 0
217217 ; CHECK: CodeViewDebugInfo [
218218 ; CHECK: Subsection [
219219 ; CHECK: SubSectionType: Symbols (0xF1)
220 ; CHECK: ProcStart {
220 ; CHECK: {{.*}}Proc{{.*}}Sym {
221221 ; CHECK: DbgStart: 0x0
222222 ; CHECK: DbgEnd: 0x0
223223 ; CHECK: FunctionType: f (0x1002)
228228 ; CHECK: DisplayName: f
229229 ; CHECK: LinkageName: ?f@@YAXMN_J@Z
230230 ; CHECK: }
231 ; CHECK: Local {
231 ; CHECK: LocalSym {
232232 ; CHECK: Type: float (0x40)
233233 ; CHECK: Flags [ (0x1)
234234 ; CHECK: IsParameter (0x1)
235235 ; CHECK: ]
236236 ; CHECK: VarName: p1
237237 ; CHECK: }
238 ; CHECK: Local {
238 ; CHECK: LocalSym {
239239 ; CHECK: Type: double (0x41)
240240 ; CHECK: Flags [ (0x1)
241241 ; CHECK: IsParameter (0x1)
242242 ; CHECK: ]
243243 ; CHECK: VarName: p2
244244 ; CHECK: }
245 ; CHECK: Local {
245 ; CHECK: LocalSym {
246246 ; CHECK: Type: __int64 (0x13)
247247 ; CHECK: Flags [ (0x1)
248248 ; CHECK: IsParameter (0x1)
249249 ; CHECK: ]
250250 ; CHECK: VarName: p3
251251 ; CHECK: }
252 ; CHECK: Local {
252 ; CHECK: LocalSym {
253253 ; CHECK: Type: int (0x74)
254254 ; CHECK: VarName: v1
255255 ; CHECK: }
256 ; CHECK: Local {
256 ; CHECK: LocalSym {
257257 ; CHECK: Type: int* (0x674)
258258 ; CHECK: VarName: v2
259259 ; CHECK: }
260 ; CHECK: Local {
260 ; CHECK: LocalSym {
261261 ; CHECK: Type: const int* (0x1004)
262262 ; CHECK: VarName: v21
263263 ; CHECK: }
264 ; CHECK: Local {
264 ; CHECK: LocalSym {
265265 ; CHECK: Type: void* (0x603)
266266 ; CHECK: VarName: v3
267267 ; CHECK: }
268 ; CHECK: Local {
268 ; CHECK: LocalSym {
269269 ; CHECK: Type: int A::* (0x1006)
270270 ; CHECK: VarName: v4
271271 ; CHECK: }
272 ; CHECK: Local {
272 ; CHECK: LocalSym {
273273 ; CHECK: Type: void A::() A::* (0x100E)
274274 ; CHECK: VarName: v5
275275 ; CHECK: }
276 ; CHECK: Local {
276 ; CHECK: LocalSym {
277277 ; CHECK: Type: long (0x12)
278278 ; CHECK: VarName: l1
279279 ; CHECK: }
280 ; CHECK: Local {
280 ; CHECK: LocalSym {
281281 ; CHECK: Type: long (0x12)
282282 ; CHECK: VarName: l2
283283 ; CHECK: }
284 ; CHECK: Local {
284 ; CHECK: LocalSym {
285285 ; CHECK: Type: unsigned long (0x22)
286286 ; CHECK: VarName: l3
287287 ; CHECK: }
288 ; CHECK: Local {
288 ; CHECK: LocalSym {
289289 ; CHECK: Type: unsigned long (0x22)
290290 ; CHECK: VarName: l4
291291 ; CHECK: }
292 ; CHECK: Local {
292 ; CHECK: LocalSym {
293293 ; CHECK: Type: const void* (0x1010)
294294 ; CHECK: VarName: v6
295295 ; CHECK: }
297297 ; CHECK: }
298298 ; CHECK: ]
299299 ; CHECK: Subsection [
300 ; CHECK: ProcStart {
300 ; CHECK: {{.*}}Proc{{.*}}Sym {
301301 ; CHECK: Type: CharTypes (0x1012)
302302 ; CHECK: DisplayName: CharTypes
303303 ; CHECK: LinkageName: ?CharTypes@@YAXXZ
304304 ; CHECK: }
305 ; CHECK: Local {
305 ; CHECK: LocalSym {
306306 ; CHECK: Type: wchar_t (0x71)
307307 ; CHECK: Flags [ (0x0)
308308 ; CHECK: ]
309309 ; CHECK: VarName: w
310310 ; CHECK: }
311 ; CHECK: Local {
311 ; CHECK: LocalSym {
312312 ; CHECK: Type: unsigned short (0x21)
313313 ; CHECK: Flags [ (0x0)
314314 ; CHECK: ]
315315 ; CHECK: VarName: us
316316 ; CHECK: }
317 ; CHECK: Local {
317 ; CHECK: LocalSym {
318318 ; CHECK: Type: char (0x70)
319319 ; CHECK: Flags [ (0x0)
320320 ; CHECK: ]
321321 ; CHECK: VarName: c
322322 ; CHECK: }
323 ; CHECK: Local {
323 ; CHECK: LocalSym {
324324 ; CHECK: Type: unsigned char (0x20)
325325 ; CHECK: Flags [ (0x0)
326326 ; CHECK: ]
327327 ; CHECK: VarName: uc
328328 ; CHECK: }
329 ; CHECK: Local {
329 ; CHECK: LocalSym {
330330 ; CHECK: Type: signed char (0x10)
331331 ; CHECK: Flags [ (0x0)
332332 ; CHECK: ]
333333 ; CHECK: VarName: sc
334334 ; CHECK: }
335 ; CHECK: Local {
335 ; CHECK: LocalSym {
336336 ; CHECK: Type: char16_t (0x7A)
337337 ; CHECK: Flags [ (0x0)
338338 ; CHECK: ]
339339 ; CHECK: VarName: c16
340340 ; CHECK: }
341 ; CHECK: Local {
341 ; CHECK: LocalSym {
342342 ; CHECK: Type: char32_t (0x7B)
343343 ; CHECK: Flags [ (0x0)
344344 ; CHECK: ]
1717 ; typedef struct { int x; } U;
1818 ; U u;
1919
20 ; CHECK: ProcStart {
20 ; CHECK: {{.*}}Proc{{.*}}Sym {
2121 ; CHECK: DisplayName: f
2222 ; CHECK: LinkageName: ?f@@YAXXZ
2323 ; CHECK: }
24 ; CHECK: UDT {
24 ; CHECK: UDTSym {
25 ; CHECK-NEXT: Kind: S_UDT (0x1108)
2526 ; CHECK-NEXT: Type: int (0x74)
2627 ; CHECK-NEXT: UDTName: f::FOO
2728 ; CHECK-NEXT: }
2829 ; CHECK-NEXT: ProcEnd {
29 ; CHECK-NEXT: }
3030
31 ; CHECK: ProcStart {
31 ; CHECK: {{.*}}Proc{{.*}}Sym {
3232 ; CHECK: DisplayName: g
3333 ; CHECK: LinkageName: ?g@@YAMPEAUS@@@Z
3434 ; CHECK: }
35 ; CHECK: UDT {
35 ; CHECK: UDTSym {
36 ; CHECK-NEXT: Kind: S_UDT (0x1108)
3637 ; CHECK-NEXT: Type: g::pun (0x{{[0-9A-F]+}})
3738 ; CHECK-NEXT: UDTName: g::pun
3839 ; CHECK-NEXT: }
3940 ; CHECK-NEXT: ProcEnd {
40 ; CHECK-NEXT: }
4141
4242 ; CHECK: Subsection
43 ; CHECK-NOT: ProcStart
44 ; CHECK: UDT {
43 ; CHECK-NOT: {{.*}}Proc{{.*}}Sym
44 ; CHECK: UDTSym {
45 ; CHECK-NEXT: Kind: S_UDT (0x1108)
4546 ; CHECK-NEXT: Type: S (0x{{[0-9A-F]+}})
4647 ; CHECK-NEXT: UDTName: S
47 ; CHECK: UDT {
48 ; CHECK: UDTSym {
49 ; CHECK-NEXT: Kind: S_UDT (0x1108)
4850 ; CHECK-NEXT: Type: (0x{{[0-9A-F]+}})
4951 ; CHECK-NEXT: UDTName: U
50 ; CHECK-NOT: UDT {
52 ; CHECK-NOT: UDTSym {
5153
5254 %struct.U = type { i32 }
5355 %struct.S = type { i32 }
5454 ; CHECK: .asciz "c"
5555 ; CHECK: .cv_def_range [[start]] [[end]]
5656
57 ; OBJ-LABEL: ProcStart {
57 ; OBJ-LABEL: {{.*}}Proc{{.*}}Sym {
5858 ; OBJ: Kind: S_GPROC32_ID (0x1147)
5959 ; OBJ: DisplayName: f
6060 ; OBJ: }
61 ; OBJ: Local {
61 ; OBJ: LocalSym {
6262 ; OBJ: Type: NonTrivial (0x1007)
6363 ; OBJ: Flags [ (0x1)
6464 ; OBJ: IsParameter (0x1)
6565 ; OBJ: ]
6666 ; OBJ: VarName: a
6767 ; OBJ: }
68 ; OBJ: DefRangeRegisterRel {
68 ; OBJ: DefRangeRegisterRelSym {
6969 ; OBJ: BaseRegister: 21
7070 ; OBJ: BasePointerOffset: 12
7171 ; OBJ: }
72 ; OBJ: Local {
72 ; OBJ: LocalSym {
7373 ; OBJ: Type: int (0x74)
7474 ; OBJ: Flags [ (0x1)
7575 ; OBJ: IsParameter (0x1)
7676 ; OBJ: ]
7777 ; OBJ: VarName: b
7878 ; OBJ: }
79 ; OBJ: DefRangeRegisterRel {
79 ; OBJ: DefRangeRegisterRelSym {
8080 ; OBJ: BaseRegister: 21
8181 ; OBJ: BasePointerOffset: 16
8282 ; OBJ: }
8383 ; FIXME: Retain unused.
84 ; OBJ: Local {
84 ; OBJ: LocalSym {
8585 ; OBJ: Type: int (0x74)
8686 ; OBJ: Flags [ (0x1)
8787 ; OBJ: IsParameter (0x1)
8888 ; OBJ: ]
8989 ; OBJ: VarName: c
9090 ; OBJ: }
91 ; OBJ: DefRangeRegisterRel {
91 ; OBJ: DefRangeRegisterRelSym {
9292 ; OBJ: BaseRegister: 21
9393 ; OBJ: BasePointerOffset: 24
9494 ; OBJ: }
11
22 # This tries to test defrange gap edge cases.
33
4 # CHECK: Local {
4 # CHECK: LocalSym {
55 # CHECK: Type: int (0x74)
66 # CHECK: VarName: p
77 # CHECK: }
8 # CHECK-NOT: Local {
9 # CHECK: DefRangeRegister {
8 # CHECK-NOT: LocalSym {
9 # CHECK: DefRangeRegisterSym {
10 # CHECK-NEXT: Kind: S_DEFRANGE_REGISTER (0x1141)
1011 # CHECK-NEXT: Register: 23
1112 # CHECK-NEXT: MayHaveNoName: 0
1213 # CHECK-NEXT: LocalVariableAddrRange {
1920 # CHECK-NEXT: Range: 0x1
2021 # CHECK-NEXT: ]
2122 # CHECK-NEXT: }
22 # CHECK-NEXT: DefRangeRegister {
23 # CHECK-NEXT: DefRangeRegisterSym {
24 # CHECK-NEXT: Kind: S_DEFRANGE_REGISTER (0x1141)
2325 # CHECK-NEXT: Register: 23
2426 # CHECK-NEXT: MayHaveNoName: 0
2527 # CHECK-NEXT: LocalVariableAddrRange {
2830 # CHECK-NEXT: Range: 0x6
2931 # CHECK-NEXT: }
3032 # CHECK-NEXT: }
31 # CHECK-NEXT: DefRangeRegister {
33 # CHECK-NEXT: DefRangeRegisterSym {
34 # CHECK-NEXT: Kind: S_DEFRANGE_REGISTER (0x1141)
3235 # CHECK-NEXT: Register: 23
3336 # CHECK-NEXT: MayHaveNoName: 0
3437 # CHECK-NEXT: LocalVariableAddrRange {
3740 # CHECK-NEXT: Range: 0x1
3841 # CHECK-NEXT: }
3942 # CHECK-NEXT: }
40 # CHECK-NEXT: DefRangeRegister {
43 # CHECK-NEXT: DefRangeRegisterSym {
44 # CHECK-NEXT: Kind: S_DEFRANGE_REGISTER (0x1141)
4145 # CHECK-NEXT: Register: 23
4246 # CHECK-NEXT: MayHaveNoName: 0
4347 # CHECK-NEXT: LocalVariableAddrRange {
7676 .short 4431 # Record kind: S_PROC_ID_END
7777 .cv_def_range Lvar_begin0 Lvar_end0, "\102\021\374\377\377\377"
7878
79 # CHECK: DefRangeFramePointerRel {
79 # CHECK: DefRangeFramePointerRelSym {
8080 # CHECK: Offset: -4
8181 # CHECK: LocalVariableAddrRange {
8282 # CHECK: OffsetStart: .text+0x9
8383 # CHECK: ISectStart: 0x0
8484 # CHECK: Range: 0xF
8585 # CHECK: }
86 # CHECK: BlockRelocations [
87 # CHECK: 0x4 IMAGE_REL_I386_SECREL .text
88 # CHECK: 0x8 IMAGE_REL_I386_SECTION .text
89 # CHECK: ]
8690 # CHECK: }
87 # CHECK: BlockRelocations [
88 # CHECK: 0x4 IMAGE_REL_I386_SECREL .text
89 # CHECK: 0x8 IMAGE_REL_I386_SECTION .text
90 # CHECK: ]
9191
9292 Ltmp1:
9393 .p2align 2
0 # RUN: llvm-mc -triple=x86_64-pc-win32 -filetype=obj < %s | llvm-readobj -codeview | FileCheck %s
11
2 # CHECK: InlineSite {
2 # CHECK: InlineSiteSym {
33 # CHECK: BinaryAnnotations [
44 # CHECK: ChangeLineOffset: 1
55 # CHECK: ChangeCodeLength: 0x2
1818 # calls to __asan_report*, for which it is very important to have an accurate
1919 # stack trace.
2020
21 # CHECK: ProcStart {
21 # CHECK: GlobalProcIdSym {
2222 # CHECK: FunctionType: g (0x1003)
2323 # CHECK: CodeOffset: g+0x0
2424 # CHECK: DisplayName: g
2525 # CHECK: LinkageName: g
2626 # CHECK: }
27 # CHECK: InlineSite {
27 # CHECK: InlineSiteSym {
2828 # CHECK: Inlinee: f (0x1002)
2929 # CHECK: BinaryAnnotations [
3030 # CHECK-NEXT: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0xE, LineOffset: 1}
7575 .short 4429
7676 .asciz "\000\000\000\000\000\000\000\000\003\020\000"
7777 .cv_inline_linetable 1 1 3 Lfunc_begin0 Lfunc_end0
78 # CHECK: InlineSite {
78 # CHECK: InlineSiteSym {
7979 # CHECK: PtrParent: 0x0
8080 # CHECK: PtrEnd: 0x0
8181 # CHECK: Inlinee: f (0x1003)
8787 .short 4429
8888 .asciz "\000\000\000\000\000\000\000\000\003\020\000"
8989 .cv_inline_linetable 1 1 9 Lfunc_begin0 Lfunc_end0
90 # CHECK: InlineSite {
90 # CHECK: InlineSiteSym {
9191 # CHECK: PtrParent: 0x0
9292 # CHECK: PtrEnd: 0x0
9393 # CHECK: Inlinee: bar (0x1003)
105105 .short 4429
106106 .asciz "\000\000\000\000\000\000\000\000\004\020\000"
107107 .cv_inline_linetable 2 1 3 Lfunc_begin0 Lfunc_end0
108 # CHECK: InlineSite {
108 # CHECK: InlineSiteSym {
109109 # CHECK: PtrParent: 0x0
110110 # CHECK: PtrEnd: 0x0
111111 # CHECK: Inlinee: foo (0x1004)
4040 MFUN32: Subsection [
4141 MFUN32-NEXT: SubSectionType: Symbols (0xF1)
4242 MFUN32-NEXT: SubSectionSize: 0x4B
43 MFUN32: ProcStart {
43 MFUN32: GlobalProcIdSym {
4444 MFUN32: CodeSize: 0xA
4545 MFUN32: DisplayName: x
4646 MFUN32: LinkageName: _x
5959 MFUN32: Subsection [
6060 MFUN32-NEXT: SubSectionType: Symbols (0xF1)
6161 MFUN32-NEXT: SubSectionSize: 0x4B
62 MFUN32: ProcStart {
62 MFUN32: GlobalProcIdSym {
6363 MFUN32: CodeSize: 0xA
6464 MFUN32: DisplayName: y
6565 MFUN32: LinkageName: _y
7878 MFUN32: Subsection [
7979 MFUN32-NEXT: SubSectionType: Symbols (0xF1)
8080 MFUN32-NEXT: SubSectionSize: 0x4B
81 MFUN32: ProcStart {
81 MFUN32: GlobalProcIdSym {
8282 MFUN32: CodeSize: 0x14
8383 MFUN32: DisplayName: f
8484 MFUN32: LinkageName: _f
192192 MFUN64: Subsection [
193193 MFUN64-NEXT: SubSectionType: Symbols (0xF1)
194194 MFUN64-NEXT: SubSectionSize: 0x4B
195 MFUN64: ProcStart {
195 MFUN64: GlobalProcIdSym {
196196 MFUN64: CodeSize: 0xE
197197 MFUN64: DisplayName: x
198198 MFUN64: LinkageName: x
207207 MFUN64-NEXT: Subsection [
208208 MFUN64-NEXT: SubSectionType: Symbols (0xF1)
209209 MFUN64-NEXT: SubSectionSize: 0x4B
210 MFUN64: ProcStart {
210 MFUN64: GlobalProcIdSym {
211211 MFUN64: CodeSize: 0xE
212212 MFUN64: DisplayName: y
213213 MFUN64: LinkageName: y
222222 MFUN64-NEXT: Subsection [
223223 MFUN64-NEXT: SubSectionType: Symbols (0xF1)
224224 MFUN64-NEXT: SubSectionSize: 0x4B
225 MFUN64: ProcStart {
225 MFUN64: GlobalProcIdSym {
226226 MFUN64: CodeSize: 0x18
227227 MFUN64: DisplayName: f
228228 MFUN64: LinkageName: f
364364 MFILE32: Subsection [
365365 MFILE32-NEXT: SubSectionType: Symbols (0xF1)
366366 MFILE32-NEXT: SubSectionSize: 0x4B
367 MFILE32: ProcStart {
367 MFILE32: GlobalProcIdSym {
368368 MFILE32: CodeSize: 0x14
369369 MFILE32: DisplayName: f
370370 MFILE32: LinkageName: _f
441441 MFILE64: Subsection [
442442 MFILE64-NEXT: SubSectionType: Symbols (0xF1)
443443 MFILE64-NEXT: SubSectionSize: 0x4B
444 MFILE64: ProcStart {
444 MFILE64: GlobalProcIdSym {
445445 MFILE64: CodeSize: 0x18
446446 MFILE64: DisplayName: f
447447 MFILE64: LinkageName: f
527527 RUN: llvm-readobj -s -codeview -section-symbols %p/Inputs/comdat-function-linetables.obj.coff-2013-i386 \
528528 RUN: | FileCheck %s -check-prefix MCOMDAT
529529
530 MCOMDAT: ProcStart {
530 MCOMDAT: GlobalProcIdSym {
531531 MCOMDAT: CodeSize: 0x7
532532 MCOMDAT: DisplayName: f
533533 MCOMDAT: LinkageName: ?f@@YAHXZ
555555 MCOMDAT-NEXT: ]
556556 MCOMDAT-NEXT: ]
557557 MCOMDAT-NEXT: ]
558 MCOMDAT: ProcStart {
558 MCOMDAT: GlobalProcIdSym {
559559 MCOMDAT: CodeSize: 0x7
560560 MCOMDAT: DisplayName: g
561561 MCOMDAT: LinkageName: ?g@@YAHXZ