[LLD][COFF] Fix TypeServerSource matcher with more than one collision
[llvm-project.git] / lld / test / COFF / pdb-type-server-native-errors.yaml
blob7b5e3938183abb5e3ae307a4a799058bd56926ea
2 # RUN: cd %S/Inputs
3 # RUN: yaml2obj %s -o %t.obj
4 # RUN: lld-link %t.obj -out:%t.exe -debug -pdb:%t.pdb -nodefaultlib -entry:main 2>&1 | FileCheck %s
5 # RUN: cd %S
7 # CHECK: warning: Cannot use debug info for {{.*}}.obj
8 # CHECK-NEXT: The PDB file is corrupt. MSF superblock is missing
10 --- !COFF
11 header:
12   Machine:         IMAGE_FILE_MACHINE_AMD64
13   Characteristics: [  ]
14 sections:
15   - Name:            '.debug$S'
16     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
17     Alignment:       1
18     Subsections:
19       - !Symbols
20         Records:
21           - Kind:            S_GPROC32_ID
22             ProcSym:
23               CodeSize:        3
24               DbgStart:        0
25               DbgEnd:          2
26               FunctionType:    4199
27               Flags:           [  ]
28               DisplayName:     main
29           - Kind:            S_FRAMEPROC
30             FrameProcSym:
31               TotalFrameBytes: 0
32               PaddingFrameBytes: 0
33               OffsetToPadding: 0
34               BytesOfCalleeSavedRegisters: 0
35               OffsetOfExceptionHandler: 0
36               SectionIdOfExceptionHandler: 0
37               Flags:           [ AsynchronousExceptionHandling, OptimizedForSpeed ]
38           - Kind:            S_PROC_ID_END
39             ScopeEndSym:
40       - !Lines
41         CodeSize:        3
42         Flags:           [  ]
43         RelocOffset:     0
44         RelocSegment:    0
45         Blocks:
46           - FileName:        'c:\src\llvm-project\build\t.c'
47             Lines:
48               - Offset:          0
49                 LineStart:       1
50                 IsStatement:     true
51                 EndDelta:        0
52             Columns:
53       - !FileChecksums
54         Checksums:
55           - FileName:        'c:\src\llvm-project\build\t.c'
56             Kind:            MD5
57             Checksum:        270A878DCC1B845655B162F56C4F5020
58       - !StringTable
59         Strings:
60           - 'c:\src\llvm-project\build\t.c'
61     Relocations:
62       - VirtualAddress:  44
63         SymbolName:      main
64         Type:            IMAGE_REL_AMD64_SECREL
65       - VirtualAddress:  48
66         SymbolName:      main
67         Type:            IMAGE_REL_AMD64_SECTION
68       - VirtualAddress:  100
69         SymbolName:      main
70         Type:            IMAGE_REL_AMD64_SECREL
71       - VirtualAddress:  104
72         SymbolName:      main
73         Type:            IMAGE_REL_AMD64_SECTION
74   - Name:            '.debug$T'
75     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
76     Alignment:       1
77     Types:
78       - Kind:            LF_TYPESERVER2
79         TypeServer2:
80           Guid:            '{1B19DF01-BF22-426B-96CE-5258B8329FE5}'
81           Age:             18
82           Name:            'bad-block-size.pdb'
83   - Name:            '.text$mn'
84     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
85     Alignment:       16
86     SectionData:     33C0C3
87 symbols:
88   - Name:            '.debug$S'
89     Value:           0
90     SectionNumber:   1
91     SimpleType:      IMAGE_SYM_TYPE_NULL
92     ComplexType:     IMAGE_SYM_DTYPE_NULL
93     StorageClass:    IMAGE_SYM_CLASS_STATIC
94     SectionDefinition:
95       Length:          328
96       NumberOfRelocations: 4
97       NumberOfLinenumbers: 0
98       CheckSum:        0
99       Number:          0
100   - Name:            '.debug$T'
101     Value:           0
102     SectionNumber:   2
103     SimpleType:      IMAGE_SYM_TYPE_NULL
104     ComplexType:     IMAGE_SYM_DTYPE_NULL
105     StorageClass:    IMAGE_SYM_CLASS_STATIC
106     SectionDefinition:
107       Length:          564
108       NumberOfRelocations: 0
109       NumberOfLinenumbers: 0
110       CheckSum:        0
111       Number:          0
112   - Name:            '.text$mn'
113     Value:           0
114     SectionNumber:   3
115     SimpleType:      IMAGE_SYM_TYPE_NULL
116     ComplexType:     IMAGE_SYM_DTYPE_NULL
117     StorageClass:    IMAGE_SYM_CLASS_STATIC
118     SectionDefinition:
119       Length:          3
120       NumberOfRelocations: 0
121       NumberOfLinenumbers: 0
122       CheckSum:        4021952397
123       Number:          0
124   - Name:            main
125     Value:           0
126     SectionNumber:   3
127     SimpleType:      IMAGE_SYM_TYPE_NULL
128     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
129     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL