1 # RUN: yaml2obj %s -o %t.obj
2 # RUN: lld-link %t.obj -dll -debug -noentry -nodefaultlib -debug -out:%t.exe -pdb:%t.pdb
3 # RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s
5 # This object generated from this C++ source:
7 # void *operator new(size_t) { return nullptr; }
8 # struct Foo { int x; };
9 # extern "C" __declspec(dllexport) Foo *f() { return new Foo; }
14 # CHECK: S_HEAPALLOCSITE [size = 16]
15 # CHECK-NEXT: type = 0x1000 (Foo), addr = {{.*}} call size = 5
19 Machine: IMAGE_FILE_MACHINE_AMD64
23 Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
25 SectionData: 2020202F44454641554C544C49423A224C4942434D5422202F44454641554C544C49423A224F4C444E414D455322202F4558504F52543A6620
27 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
35 ObjectName: 'C:\src\llvm-project\build\t.obj'
38 Flags: [ SecurityChecks, HotPatch ]
48 Version: 'Microsoft (R) Optimizing Compiler'
58 DisplayName: operator new
64 BytesOfCalleeSavedRegisters: 0
65 OffsetOfExceptionHandler: 0
66 SectionIdOfExceptionHandler: 0
67 Flags: [ AsynchronousExceptionHandling, OptimizedForSpeed ]
82 - FileName: 'c:\src\llvm-project\build\t.cpp'
104 BytesOfCalleeSavedRegisters: 0
105 OffsetOfExceptionHandler: 0
106 SectionIdOfExceptionHandler: 0
107 Flags: [ AsynchronousExceptionHandling, OptimizedForSpeed ]
108 - Kind: S_HEAPALLOCSITE
109 HeapAllocationSiteSym:
111 CallInstructionSize: 5
113 - Kind: S_PROC_ID_END
121 - FileName: 'c:\src\llvm-project\build\t.cpp'
137 UDTName: '__vc_attributes::event_sourceAttribute'
141 UDTName: '__vc_attributes::event_sourceAttribute::optimize_e'
145 UDTName: '__vc_attributes::event_sourceAttribute::type_e'
149 UDTName: '__vc_attributes::helper_attributes::v1_alttypeAttribute'
153 UDTName: '__vc_attributes::helper_attributes::v1_alttypeAttribute::type_e'
157 UDTName: '__vc_attributes::helper_attributes::usageAttribute'
161 UDTName: '__vc_attributes::helper_attributes::usageAttribute::usage_e'
165 UDTName: '__vc_attributes::threadingAttribute'
169 UDTName: '__vc_attributes::threadingAttribute::threading_e'
173 UDTName: '__vc_attributes::aggregatableAttribute'
177 UDTName: '__vc_attributes::aggregatableAttribute::type_e'
181 UDTName: '__vc_attributes::event_receiverAttribute'
185 UDTName: '__vc_attributes::event_receiverAttribute::type_e'
189 UDTName: '__vc_attributes::moduleAttribute'
193 UDTName: '__vc_attributes::moduleAttribute::type_e'
200 - FileName: 'c:\src\llvm-project\build\t.cpp'
202 Checksum: 3C4D132707FA572FA0869E4E4DAA7F85
205 - 'c:\src\llvm-project\build\t.cpp'
212 - VirtualAddress: 152
213 SymbolName: '??2@YAPEAX_K@Z'
214 Type: IMAGE_REL_AMD64_SECREL
215 - VirtualAddress: 156
216 SymbolName: '??2@YAPEAX_K@Z'
217 Type: IMAGE_REL_AMD64_SECTION
218 - VirtualAddress: 240
219 SymbolName: '??2@YAPEAX_K@Z'
220 Type: IMAGE_REL_AMD64_SECREL
221 - VirtualAddress: 244
222 SymbolName: '??2@YAPEAX_K@Z'
223 Type: IMAGE_REL_AMD64_SECTION
224 - VirtualAddress: 312
226 Type: IMAGE_REL_AMD64_SECREL
227 - VirtualAddress: 316
229 Type: IMAGE_REL_AMD64_SECTION
230 - VirtualAddress: 355
232 Type: IMAGE_REL_AMD64_SECREL
233 - VirtualAddress: 359
235 Type: IMAGE_REL_AMD64_SECTION
236 - VirtualAddress: 380
238 Type: IMAGE_REL_AMD64_SECREL
239 - VirtualAddress: 384
241 Type: IMAGE_REL_AMD64_SECTION
243 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
249 Options: [ None, ForwardReference, HasUniqueName ]
252 UniqueName: '.?AUFoo@@'
267 Options: [ None, HasUniqueName ]
270 UniqueName: '.?AUFoo@@'
277 String: 'c:\src\llvm-project\build\t.cpp'
278 - Kind: LF_UDT_SRC_LINE
320 Options: [ None, ForwardReference, HasUniqueName ]
322 Name: '__vc_attributes::moduleAttribute'
323 UniqueName: '.?AUmoduleAttribute@__vc_attributes@@'
362 Options: [ None, Nested, HasUniqueName ]
364 Name: '__vc_attributes::moduleAttribute::type_e'
365 UniqueName: '.?AW4type_e@moduleAttribute@__vc_attributes@@'
370 String: 'c:\src\llvm-project\build\predefined c++ attributes (compiler internal)'
371 - Kind: LF_UDT_SRC_LINE
379 Modifiers: [ None, Const ]
386 ArgIndices: [ 4110, 4114, 4114, 4114, 116, 48, 4114, 116,
387 4114, 4114, 116, 48, 48, 4114, 4114 ]
398 Options: [ None, Constructor ]
401 ThisPointerAdjustment: 0
411 Options: [ None, Constructor ]
414 ThisPointerAdjustment: 0
421 Options: [ None, Constructor ]
424 ThisPointerAdjustment: 0
425 - Kind: LF_METHODLIST
450 Name: moduleAttribute
498 Name: helpstringcontext
544 Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
546 Name: '__vc_attributes::moduleAttribute'
547 UniqueName: '.?AUmoduleAttribute@__vc_attributes@@'
551 - Kind: LF_UDT_SRC_LINE
559 Options: [ None, ForwardReference, HasUniqueName ]
561 Name: '__vc_attributes::event_receiverAttribute'
562 UniqueName: '.?AUevent_receiverAttribute@__vc_attributes@@'
586 Options: [ None, Nested, HasUniqueName ]
588 Name: '__vc_attributes::event_receiverAttribute::type_e'
589 UniqueName: '.?AW4type_e@event_receiverAttribute@__vc_attributes@@'
591 - Kind: LF_UDT_SRC_LINE
598 ArgIndices: [ 4127, 48 ]
609 Options: [ None, Constructor ]
612 ThisPointerAdjustment: 0
622 Options: [ None, Constructor ]
625 ThisPointerAdjustment: 0
632 Options: [ None, Constructor ]
635 ThisPointerAdjustment: 0
636 - Kind: LF_METHODLIST
661 Name: event_receiverAttribute
673 Name: layout_dependent
677 Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
679 Name: '__vc_attributes::event_receiverAttribute'
680 UniqueName: '.?AUevent_receiverAttribute@__vc_attributes@@'
684 - Kind: LF_UDT_SRC_LINE
692 Options: [ None, ForwardReference, HasUniqueName ]
694 Name: '__vc_attributes::aggregatableAttribute'
695 UniqueName: '.?AUaggregatableAttribute@__vc_attributes@@'
719 Options: [ None, Nested, HasUniqueName ]
721 Name: '__vc_attributes::aggregatableAttribute::type_e'
722 UniqueName: '.?AW4type_e@aggregatableAttribute@__vc_attributes@@'
724 - Kind: LF_UDT_SRC_LINE
742 Options: [ None, Constructor ]
745 ThisPointerAdjustment: 0
752 Options: [ None, Constructor ]
755 ThisPointerAdjustment: 0
756 - Kind: LF_METHODLIST
777 Name: aggregatableAttribute
787 Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
789 Name: '__vc_attributes::aggregatableAttribute'
790 UniqueName: '.?AUaggregatableAttribute@__vc_attributes@@'
794 - Kind: LF_UDT_SRC_LINE
802 Options: [ None, ForwardReference, HasUniqueName ]
804 Name: '__vc_attributes::threadingAttribute'
805 UniqueName: '.?AUthreadingAttribute@__vc_attributes@@'
839 Options: [ None, Nested, HasUniqueName ]
841 Name: '__vc_attributes::threadingAttribute::threading_e'
842 UniqueName: '.?AW4threading_e@threadingAttribute@__vc_attributes@@'
844 - Kind: LF_UDT_SRC_LINE
862 Options: [ None, Constructor ]
865 ThisPointerAdjustment: 0
872 Options: [ None, Constructor ]
875 ThisPointerAdjustment: 0
876 - Kind: LF_METHODLIST
897 Name: threadingAttribute
907 Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
909 Name: '__vc_attributes::threadingAttribute'
910 UniqueName: '.?AUthreadingAttribute@__vc_attributes@@'
914 - Kind: LF_UDT_SRC_LINE
922 Options: [ None, ForwardReference, HasUniqueName ]
924 Name: '__vc_attributes::helper_attributes::usageAttribute'
925 UniqueName: '.?AUusageAttribute@helper_attributes@__vc_attributes@@'
945 Name: eCOMInterfaceUsage
950 Name: eInterfaceUsage
965 Name: eInterfaceMethodUsage
970 Name: eInterfaceMemberUsage
975 Name: eCoClassMemberUsage
980 Name: eCoClassMethodUsage
985 Name: eGlobalMethodUsage
990 Name: eGlobalDataUsage
1000 Name: eInterfaceParameterUsage
1001 - Kind: LF_ENUMERATE
1005 Name: eMethodParameterUsage
1006 - Kind: LF_ENUMERATE
1010 Name: eIDLModuleUsage
1011 - Kind: LF_ENUMERATE
1015 Name: eAnonymousUsage
1016 - Kind: LF_ENUMERATE
1021 - Kind: LF_ENUMERATE
1026 - Kind: LF_ENUMERATE
1031 - Kind: LF_ENUMERATE
1035 Name: eDefineTagUsage
1036 - Kind: LF_ENUMERATE
1041 - Kind: LF_ENUMERATE
1046 - Kind: LF_ENUMERATE
1050 Name: ePropertyUsage
1051 - Kind: LF_ENUMERATE
1056 - Kind: LF_ENUMERATE
1060 Name: eTemplateUsage
1061 - Kind: LF_ENUMERATE
1066 - Kind: LF_ENUMERATE
1071 - Kind: LF_ENUMERATE
1075 Name: eAsynchronousUsage
1076 - Kind: LF_ENUMERATE
1084 Options: [ None, Nested, HasUniqueName ]
1086 Name: '__vc_attributes::helper_attributes::usageAttribute::usage_e'
1087 UniqueName: '.?AW4usage_e@usageAttribute@helper_attributes@__vc_attributes@@'
1089 - Kind: LF_UDT_SRC_LINE
1101 - Kind: LF_MFUNCTION
1107 Options: [ None, Constructor ]
1110 ThisPointerAdjustment: 0
1111 - Kind: LF_FIELDLIST
1117 - Kind: LF_ONEMETHOD
1122 Name: usageAttribute
1129 - Kind: LF_STRUCTURE
1132 Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
1134 Name: '__vc_attributes::helper_attributes::usageAttribute'
1135 UniqueName: '.?AUusageAttribute@helper_attributes@__vc_attributes@@'
1139 - Kind: LF_UDT_SRC_LINE
1144 - Kind: LF_STRUCTURE
1147 Options: [ None, ForwardReference, HasUniqueName ]
1149 Name: '__vc_attributes::helper_attributes::v1_alttypeAttribute'
1150 UniqueName: '.?AUv1_alttypeAttribute@helper_attributes@__vc_attributes@@'
1154 - Kind: LF_FIELDLIST
1156 - Kind: LF_ENUMERATE
1161 - Kind: LF_ENUMERATE
1166 - Kind: LF_ENUMERATE
1171 - Kind: LF_ENUMERATE
1179 Options: [ None, Nested, HasUniqueName ]
1181 Name: '__vc_attributes::helper_attributes::v1_alttypeAttribute::type_e'
1182 UniqueName: '.?AW4type_e@v1_alttypeAttribute@helper_attributes@__vc_attributes@@'
1184 - Kind: LF_UDT_SRC_LINE
1191 ArgIndices: [ 4175 ]
1196 - Kind: LF_MFUNCTION
1202 Options: [ None, Constructor ]
1205 ThisPointerAdjustment: 0
1206 - Kind: LF_FIELDLIST
1212 - Kind: LF_ONEMETHOD
1217 Name: v1_alttypeAttribute
1224 - Kind: LF_STRUCTURE
1227 Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
1229 Name: '__vc_attributes::helper_attributes::v1_alttypeAttribute'
1230 UniqueName: '.?AUv1_alttypeAttribute@helper_attributes@__vc_attributes@@'
1234 - Kind: LF_UDT_SRC_LINE
1239 - Kind: LF_STRUCTURE
1242 Options: [ None, ForwardReference, HasUniqueName ]
1244 Name: '__vc_attributes::event_sourceAttribute'
1245 UniqueName: '.?AUevent_sourceAttribute@__vc_attributes@@'
1249 - Kind: LF_FIELDLIST
1251 - Kind: LF_ENUMERATE
1256 - Kind: LF_ENUMERATE
1261 - Kind: LF_ENUMERATE
1269 Options: [ None, Nested, HasUniqueName ]
1271 Name: '__vc_attributes::event_sourceAttribute::type_e'
1272 UniqueName: '.?AW4type_e@event_sourceAttribute@__vc_attributes@@'
1274 - Kind: LF_UDT_SRC_LINE
1279 - Kind: LF_FIELDLIST
1281 - Kind: LF_ENUMERATE
1286 - Kind: LF_ENUMERATE
1294 Options: [ None, Nested, HasUniqueName ]
1296 Name: '__vc_attributes::event_sourceAttribute::optimize_e'
1297 UniqueName: '.?AW4optimize_e@event_sourceAttribute@__vc_attributes@@'
1299 - Kind: LF_UDT_SRC_LINE
1306 ArgIndices: [ 4185 ]
1311 - Kind: LF_MFUNCTION
1317 Options: [ None, Constructor ]
1320 ThisPointerAdjustment: 0
1321 - Kind: LF_MFUNCTION
1327 Options: [ None, Constructor ]
1330 ThisPointerAdjustment: 0
1331 - Kind: LF_METHODLIST
1342 - Kind: LF_FIELDLIST
1356 Name: event_sourceAttribute
1375 - Kind: LF_STRUCTURE
1378 Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
1380 Name: '__vc_attributes::event_sourceAttribute'
1381 UniqueName: '.?AUevent_sourceAttribute@__vc_attributes@@'
1385 - Kind: LF_UDT_SRC_LINE
1390 - Kind: LF_STRING_ID
1393 String: 'C:\src\llvm-project\build'
1394 - Kind: LF_STRING_ID
1397 String: 'C:\PROGRA~2\MICROS~1\2017\PROFES~1\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\cl.exe'
1398 - Kind: LF_STRING_ID
1401 String: '-c -Z7 -MT -IC:\PROGRA~2\MICROS~1\2017\PROFES~1\VC\Tools\MSVC\14.11.25503\ATLMFC\include -IC:\PROGRA~2\MICROS~1\2017\PROFES~1\VC\Tools\MSVC\14.11.25503\include -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.16299.0\ucrt -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.16299.0\'
1402 - Kind: LF_SUBSTR_LIST
1404 StringIndices: [ 4200 ]
1405 - Kind: LF_STRING_ID
1408 String: 'shared -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.16299.0\um -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.16299.0\winrt -TP -X'
1409 - Kind: LF_STRING_ID
1413 - Kind: LF_STRING_ID
1416 String: 'C:\src\llvm-project\build\vc140.pdb'
1417 - Kind: LF_BUILDINFO
1419 ArgIndices: [ 4198, 4199, 4203, 4204, 4202 ]
1421 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
1423 SectionData: 48894C240833C0C3CCCCCCCCCCCCCCCC4883EC38B904000000E8000000004889442420488B4424204883C438C3
1425 - VirtualAddress: 26
1426 SymbolName: '??2@YAPEAX_K@Z'
1427 Type: IMAGE_REL_AMD64_REL32
1429 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
1431 SectionData: '0104010004620000'
1433 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
1435 SectionData: 000000001D00000000000000
1439 Type: IMAGE_REL_AMD64_ADDR32NB
1442 Type: IMAGE_REL_AMD64_ADDR32NB
1444 SymbolName: '$unwind$f'
1445 Type: IMAGE_REL_AMD64_ADDR32NB
1450 SimpleType: IMAGE_SYM_TYPE_NULL
1451 ComplexType: IMAGE_SYM_DTYPE_NULL
1452 StorageClass: IMAGE_SYM_CLASS_STATIC
1456 SimpleType: IMAGE_SYM_TYPE_NULL
1457 ComplexType: IMAGE_SYM_DTYPE_NULL
1458 StorageClass: IMAGE_SYM_CLASS_STATIC
1462 SimpleType: IMAGE_SYM_TYPE_NULL
1463 ComplexType: IMAGE_SYM_DTYPE_NULL
1464 StorageClass: IMAGE_SYM_CLASS_STATIC
1467 NumberOfRelocations: 0
1468 NumberOfLinenumbers: 0
1469 CheckSum: 1455566745
1474 SimpleType: IMAGE_SYM_TYPE_NULL
1475 ComplexType: IMAGE_SYM_DTYPE_NULL
1476 StorageClass: IMAGE_SYM_CLASS_STATIC
1479 NumberOfRelocations: 10
1480 NumberOfLinenumbers: 0
1486 SimpleType: IMAGE_SYM_TYPE_NULL
1487 ComplexType: IMAGE_SYM_DTYPE_NULL
1488 StorageClass: IMAGE_SYM_CLASS_STATIC
1491 NumberOfRelocations: 0
1492 NumberOfLinenumbers: 0
1498 SimpleType: IMAGE_SYM_TYPE_NULL
1499 ComplexType: IMAGE_SYM_DTYPE_NULL
1500 StorageClass: IMAGE_SYM_CLASS_STATIC
1503 NumberOfRelocations: 1
1504 NumberOfLinenumbers: 0
1505 CheckSum: 1509507051
1507 - Name: '??2@YAPEAX_K@Z'
1510 SimpleType: IMAGE_SYM_TYPE_NULL
1511 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
1512 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
1516 SimpleType: IMAGE_SYM_TYPE_NULL
1517 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
1518 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
1522 SimpleType: IMAGE_SYM_TYPE_NULL
1523 ComplexType: IMAGE_SYM_DTYPE_NULL
1524 StorageClass: IMAGE_SYM_CLASS_LABEL
1528 SimpleType: IMAGE_SYM_TYPE_NULL
1529 ComplexType: IMAGE_SYM_DTYPE_NULL
1530 StorageClass: IMAGE_SYM_CLASS_STATIC
1533 NumberOfRelocations: 0
1534 NumberOfLinenumbers: 0
1540 SimpleType: IMAGE_SYM_TYPE_NULL
1541 ComplexType: IMAGE_SYM_DTYPE_NULL
1542 StorageClass: IMAGE_SYM_CLASS_STATIC
1546 SimpleType: IMAGE_SYM_TYPE_NULL
1547 ComplexType: IMAGE_SYM_DTYPE_NULL
1548 StorageClass: IMAGE_SYM_CLASS_STATIC
1551 NumberOfRelocations: 3
1552 NumberOfLinenumbers: 0
1553 CheckSum: 3887998202
1558 SimpleType: IMAGE_SYM_TYPE_NULL
1559 ComplexType: IMAGE_SYM_DTYPE_NULL
1560 StorageClass: IMAGE_SYM_CLASS_STATIC