[clang-tidy][use-internal-linkage]fix false positives for global overloaded operator...
[llvm-project.git] / lld / test / COFF / line-error.yaml
blob0bd165b3c361d3e64075f6dbcddb14caad0b517a
1 # RUN: yaml2obj %s -o %t.obj
2 # RUN: not lld-link %t.obj /subsystem:console 2>&1 | FileCheck %s
4 # CHECK: lld-link: error: undefined symbol: function
5 # CHECK-NEXT: >>> referenced by {{.*}}line-error.yaml.tmp.obj:(caller1)
6 # CHECK-NEXT: >>> referenced by E:\file.cpp:1935
7 # CHECK-NEXT: >>>               {{.*}}line-error.yaml.tmp.obj:(caller22)
9 --- !COFF
10 header:
11   Machine:         IMAGE_FILE_MACHINE_AMD64
12   Characteristics: [  ]
13 sections:
14   - Name:            .text
15     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
16     Alignment:       16
17     SectionData:     488B0500000000488B51284881C2D80000004889C148FF2500000000
18     Relocations:
19       - VirtualAddress:  3
20         SymbolName:      function
21         Type:            IMAGE_REL_AMD64_REL32
22   - Name:            .text
23     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
24     Alignment:       16
25     SectionData:     488B0500000000488B51084881C2D80000004889C148FF2500000000
26     Relocations:
27       - VirtualAddress:  3
28         SymbolName:      function
29         Type:            IMAGE_REL_AMD64_REL32
30   - Name:            '.debug$S'
31     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
32     Alignment:       4
33     Subsections:
34       - !FileChecksums
35         Checksums:
36           - FileName:        'E:\file.cpp'
37             Kind:            MD5
38             Checksum:        D72EDEF8B8E50C364A330F9CB3CD904B
39       - !StringTable
40         Strings:
41           - 'E:\file.cpp'
42   - Name:            '.debug$S'
43     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
44     Alignment:       4
45     Subsections:
46       - !Lines
47         CodeSize:        28
48         Flags:           [  ]
49         RelocOffset:     0
50         RelocSegment:    0
51         Blocks:          []
52     Relocations:
53       - VirtualAddress:  12
54         SymbolName:      caller1
55         Type:            IMAGE_REL_AMD64_SECREL
56   - Name:            '.debug$S'
57     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
58     Alignment:       4
59     Subsections:
60       - !Lines
61         CodeSize:        28
62         Flags:           [  ]
63         RelocOffset:     0
64         RelocSegment:    0
65         Blocks:
66           - FileName:        'E:\file.cpp'
67             Lines:
68               - Offset:          11
69                 LineStart:       1935
70                 IsStatement:     false
71                 EndDelta:        0
72             Columns:         []
73     Relocations:
74       - VirtualAddress:  12
75         SymbolName:      caller22
76         Type:            IMAGE_REL_AMD64_SECREL
77 symbols:
78   - Name:            .text
79     Value:           0
80     SectionNumber:   1
81     SimpleType:      IMAGE_SYM_TYPE_NULL
82     ComplexType:     IMAGE_SYM_DTYPE_NULL
83     StorageClass:    IMAGE_SYM_CLASS_STATIC
84     SectionDefinition:
85       Length:          28
86       NumberOfRelocations: 2
87       NumberOfLinenumbers: 0
88       CheckSum:        2430089736
89       Number:          1
90       Selection:       IMAGE_COMDAT_SELECT_NODUPLICATES
91   - Name:            caller1
92     Value:           0
93     SectionNumber:   1
94     SimpleType:      IMAGE_SYM_TYPE_NULL
95     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
96     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
97   - Name:            .text
98     Value:           0
99     SectionNumber:   2
100     SimpleType:      IMAGE_SYM_TYPE_NULL
101     ComplexType:     IMAGE_SYM_DTYPE_NULL
102     StorageClass:    IMAGE_SYM_CLASS_STATIC
103     SectionDefinition:
104       Length:          28
105       NumberOfRelocations: 2
106       NumberOfLinenumbers: 0
107       CheckSum:        3449717304
108       Number:          2
109       Selection:       IMAGE_COMDAT_SELECT_NODUPLICATES
110   - Name:            caller22
111     Value:           0
112     SectionNumber:   2
113     SimpleType:      IMAGE_SYM_TYPE_NULL
114     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
115     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
116   - Name:            '.debug$S'
117     Value:           0
118     SectionNumber:   3
119     SimpleType:      IMAGE_SYM_TYPE_NULL
120     ComplexType:     IMAGE_SYM_DTYPE_NULL
121     StorageClass:    IMAGE_SYM_CLASS_STATIC
122     SectionDefinition:
123       Length:          767204
124       NumberOfRelocations: 0
125       NumberOfLinenumbers: 0
126       CheckSum:        4280093374
127       Number:          3
128   - Name:            '.debug$S'
129     Value:           0
130     SectionNumber:   4
131     SimpleType:      IMAGE_SYM_TYPE_NULL
132     ComplexType:     IMAGE_SYM_DTYPE_NULL
133     StorageClass:    IMAGE_SYM_CLASS_STATIC
134     SectionDefinition:
135       Length:          296
136       NumberOfRelocations: 1
137       NumberOfLinenumbers: 0
138       CheckSum:        1957793731
139       Number:          1
140       Selection:       IMAGE_COMDAT_SELECT_ASSOCIATIVE
141   - Name:            '.debug$S'
142     Value:           0
143     SectionNumber:   5
144     SimpleType:      IMAGE_SYM_TYPE_NULL
145     ComplexType:     IMAGE_SYM_DTYPE_NULL
146     StorageClass:    IMAGE_SYM_CLASS_STATIC
147     SectionDefinition:
148       Length:          276
149       NumberOfRelocations: 1
150       NumberOfLinenumbers: 0
151       CheckSum:        1957793731
152       Number:          2
153       Selection:       IMAGE_COMDAT_SELECT_ASSOCIATIVE
154   - Name:            function
155     Value:           0
156     SectionNumber:   0
157     SimpleType:      IMAGE_SYM_TYPE_NULL
158     ComplexType:     IMAGE_SYM_DTYPE_NULL
159     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL