1 ; Test that the native PDB reader can enumerate pointer types. The output
2 ; being checked against is golden output generated by llvm-pdbutil without
3 ; the -native flag. Then we check that we generate the same output.
5 ; RUN: llvm-pdbutil pretty -native -pointers \
6 ; RUN: %p/../Inputs/every-pointer.pdb | FileCheck %s --check-prefix=PRETTY
7 ; RUN: llvm-pdbutil diadump -no-ids -native -pointers \
8 ; RUN: %p/../Inputs/every-pointer.pdb | FileCheck %s
10 ; PRETTY: Pointers: (29 items)
12 ; PRETTY-NEXT: struct Foo*
14 ; PRETTY-NEXT: const int*
15 ; PRETTY-NEXT: volatile int*
16 ; PRETTY-NEXT: const volatile int*
19 ; PRETTY-NEXT: struct __vc_attributes::event_sourceAttribute*
20 ; PRETTY-NEXT: struct __vc_attributes::helper_attributes::v1_alttypeAttribute*
21 ; PRETTY-NEXT: struct __vc_attributes::helper_attributes::usageAttribute*
22 ; PRETTY-NEXT: struct __vc_attributes::threadingAttribute*
23 ; PRETTY-NEXT: struct __vc_attributes::aggregatableAttribute*
24 ; PRETTY-NEXT: struct __vc_attributes::event_receiverAttribute*
25 ; PRETTY-NEXT: struct __vc_attributes::moduleAttribute*
26 ; PRETTY-NEXT: const char*
28 ; PRETTY-NEXT: struct Foo*
29 ; PRETTY-NEXT: void (__cdecl Foo::*)()
30 ; PRETTY-NEXT: int Foo::*
31 ; PRETTY-NEXT: int (__cdecl Foo::*)()
32 ; PRETTY-NEXT: void (__cdecl *)()
33 ; PRETTY-NEXT: unaligned struct Foo*
34 ; PRETTY-NEXT: struct Foo*
35 ; PRETTY-NEXT: const struct Foo*
36 ; PRETTY-NEXT: volatile struct Foo*
37 ; PRETTY-NEXT: const volatile struct Foo*
38 ; PRETTY-NEXT: struct Foo&&
39 ; PRETTY-NEXT: struct Foo
42 ; CHECK-NEXT: symTag: PointerType
43 ; CHECK-NEXT: length: 8
44 ; CHECK-NEXT: constType: 0
45 ; CHECK-NEXT: isPointerToDataMember: 0
46 ; CHECK-NEXT: isPointerToMemberFunction: 0
47 ; CHECK-NEXT: RValueReference: 0
48 ; CHECK-NEXT: reference: 0
49 ; CHECK-NEXT: restrictedType: 0
50 ; CHECK-NEXT: unalignedType: 0
51 ; CHECK-NEXT: volatileType: 0
54 ; CHECK-NEXT: symTag: PointerType
55 ; CHECK-NEXT: length: 8
56 ; CHECK-NEXT: constType: 0
57 ; CHECK-NEXT: isPointerToDataMember: 0
58 ; CHECK-NEXT: isPointerToMemberFunction: 0
59 ; CHECK-NEXT: RValueReference: 0
60 ; CHECK-NEXT: reference: 0
61 ; CHECK-NEXT: restrictedType: 0
62 ; CHECK-NEXT: unalignedType: 0
63 ; CHECK-NEXT: volatileType: 0
66 ; CHECK-NEXT: symTag: PointerType
67 ; CHECK-NEXT: length: 8
68 ; CHECK-NEXT: constType: 0
69 ; CHECK-NEXT: isPointerToDataMember: 0
70 ; CHECK-NEXT: isPointerToMemberFunction: 0
71 ; CHECK-NEXT: RValueReference: 0
72 ; CHECK-NEXT: reference: 1
73 ; CHECK-NEXT: restrictedType: 0
74 ; CHECK-NEXT: unalignedType: 0
75 ; CHECK-NEXT: volatileType: 0
78 ; CHECK-NEXT: symTag: PointerType
79 ; CHECK-NEXT: length: 8
80 ; CHECK-NEXT: constType: 0
81 ; CHECK-NEXT: isPointerToDataMember: 0
82 ; CHECK-NEXT: isPointerToMemberFunction: 0
83 ; CHECK-NEXT: RValueReference: 0
84 ; CHECK-NEXT: reference: 0
85 ; CHECK-NEXT: restrictedType: 0
86 ; CHECK-NEXT: unalignedType: 0
87 ; CHECK-NEXT: volatileType: 0
90 ; CHECK-NEXT: symTag: PointerType
91 ; CHECK-NEXT: length: 8
92 ; CHECK-NEXT: constType: 0
93 ; CHECK-NEXT: isPointerToDataMember: 0
94 ; CHECK-NEXT: isPointerToMemberFunction: 0
95 ; CHECK-NEXT: RValueReference: 0
96 ; CHECK-NEXT: reference: 0
97 ; CHECK-NEXT: restrictedType: 0
98 ; CHECK-NEXT: unalignedType: 0
99 ; CHECK-NEXT: volatileType: 0
102 ; CHECK-NEXT: symTag: PointerType
103 ; CHECK-NEXT: length: 8
104 ; CHECK-NEXT: constType: 0
105 ; CHECK-NEXT: isPointerToDataMember: 0
106 ; CHECK-NEXT: isPointerToMemberFunction: 0
107 ; CHECK-NEXT: RValueReference: 0
108 ; CHECK-NEXT: reference: 0
109 ; CHECK-NEXT: restrictedType: 0
110 ; CHECK-NEXT: unalignedType: 0
111 ; CHECK-NEXT: volatileType: 0
114 ; CHECK-NEXT: symTag: PointerType
115 ; CHECK-NEXT: length: 8
116 ; CHECK-NEXT: constType: 0
117 ; CHECK-NEXT: isPointerToDataMember: 0
118 ; CHECK-NEXT: isPointerToMemberFunction: 0
119 ; CHECK-NEXT: RValueReference: 0
120 ; CHECK-NEXT: reference: 0
121 ; CHECK-NEXT: restrictedType: 0
122 ; CHECK-NEXT: unalignedType: 0
123 ; CHECK-NEXT: volatileType: 0
126 ; CHECK-NEXT: symTag: PointerType
127 ; CHECK-NEXT: length: 8
128 ; CHECK-NEXT: constType: 0
129 ; CHECK-NEXT: isPointerToDataMember: 0
130 ; CHECK-NEXT: isPointerToMemberFunction: 0
131 ; CHECK-NEXT: RValueReference: 0
132 ; CHECK-NEXT: reference: 0
133 ; CHECK-NEXT: restrictedType: 1
134 ; CHECK-NEXT: unalignedType: 0
135 ; CHECK-NEXT: volatileType: 0
138 ; CHECK-NEXT: symTag: PointerType
139 ; CHECK-NEXT: length: 8
140 ; CHECK-NEXT: constType: 1
141 ; CHECK-NEXT: isPointerToDataMember: 0
142 ; CHECK-NEXT: isPointerToMemberFunction: 0
143 ; CHECK-NEXT: RValueReference: 0
144 ; CHECK-NEXT: reference: 0
145 ; CHECK-NEXT: restrictedType: 0
146 ; CHECK-NEXT: unalignedType: 0
147 ; CHECK-NEXT: volatileType: 0
150 ; CHECK-NEXT: symTag: PointerType
151 ; CHECK-NEXT: length: 8
152 ; CHECK-NEXT: constType: 1
153 ; CHECK-NEXT: isPointerToDataMember: 0
154 ; CHECK-NEXT: isPointerToMemberFunction: 0
155 ; CHECK-NEXT: RValueReference: 0
156 ; CHECK-NEXT: reference: 0
157 ; CHECK-NEXT: restrictedType: 0
158 ; CHECK-NEXT: unalignedType: 0
159 ; CHECK-NEXT: volatileType: 0
162 ; CHECK-NEXT: symTag: PointerType
163 ; CHECK-NEXT: length: 8
164 ; CHECK-NEXT: constType: 1
165 ; CHECK-NEXT: isPointerToDataMember: 0
166 ; CHECK-NEXT: isPointerToMemberFunction: 0
167 ; CHECK-NEXT: RValueReference: 0
168 ; CHECK-NEXT: reference: 0
169 ; CHECK-NEXT: restrictedType: 0
170 ; CHECK-NEXT: unalignedType: 0
171 ; CHECK-NEXT: volatileType: 0
174 ; CHECK-NEXT: symTag: PointerType
175 ; CHECK-NEXT: length: 8
176 ; CHECK-NEXT: constType: 1
177 ; CHECK-NEXT: isPointerToDataMember: 0
178 ; CHECK-NEXT: isPointerToMemberFunction: 0
179 ; CHECK-NEXT: RValueReference: 0
180 ; CHECK-NEXT: reference: 0
181 ; CHECK-NEXT: restrictedType: 0
182 ; CHECK-NEXT: unalignedType: 0
183 ; CHECK-NEXT: volatileType: 0
186 ; CHECK-NEXT: symTag: PointerType
187 ; CHECK-NEXT: length: 8
188 ; CHECK-NEXT: constType: 1
189 ; CHECK-NEXT: isPointerToDataMember: 0
190 ; CHECK-NEXT: isPointerToMemberFunction: 0
191 ; CHECK-NEXT: RValueReference: 0
192 ; CHECK-NEXT: reference: 0
193 ; CHECK-NEXT: restrictedType: 0
194 ; CHECK-NEXT: unalignedType: 0
195 ; CHECK-NEXT: volatileType: 0
198 ; CHECK-NEXT: symTag: PointerType
199 ; CHECK-NEXT: length: 8
200 ; CHECK-NEXT: constType: 1
201 ; CHECK-NEXT: isPointerToDataMember: 0
202 ; CHECK-NEXT: isPointerToMemberFunction: 0
203 ; CHECK-NEXT: RValueReference: 0
204 ; CHECK-NEXT: reference: 0
205 ; CHECK-NEXT: restrictedType: 0
206 ; CHECK-NEXT: unalignedType: 0
207 ; CHECK-NEXT: volatileType: 0
210 ; CHECK-NEXT: symTag: PointerType
211 ; CHECK-NEXT: length: 8
212 ; CHECK-NEXT: constType: 1
213 ; CHECK-NEXT: isPointerToDataMember: 0
214 ; CHECK-NEXT: isPointerToMemberFunction: 0
215 ; CHECK-NEXT: RValueReference: 0
216 ; CHECK-NEXT: reference: 0
217 ; CHECK-NEXT: restrictedType: 0
218 ; CHECK-NEXT: unalignedType: 0
219 ; CHECK-NEXT: volatileType: 0
222 ; CHECK-NEXT: symTag: PointerType
223 ; CHECK-NEXT: length: 8
224 ; CHECK-NEXT: constType: 0
225 ; CHECK-NEXT: isPointerToDataMember: 0
226 ; CHECK-NEXT: isPointerToMemberFunction: 0
227 ; CHECK-NEXT: RValueReference: 0
228 ; CHECK-NEXT: reference: 0
229 ; CHECK-NEXT: restrictedType: 0
230 ; CHECK-NEXT: unalignedType: 0
231 ; CHECK-NEXT: volatileType: 0
234 ; CHECK-NEXT: symTag: PointerType
235 ; CHECK-NEXT: length: 8
236 ; CHECK-NEXT: constType: 0
237 ; CHECK-NEXT: isPointerToDataMember: 0
238 ; CHECK-NEXT: isPointerToMemberFunction: 0
239 ; CHECK-NEXT: RValueReference: 1
240 ; CHECK-NEXT: reference: 0
241 ; CHECK-NEXT: restrictedType: 0
242 ; CHECK-NEXT: unalignedType: 0
243 ; CHECK-NEXT: volatileType: 0
246 ; CHECK-NEXT: symTag: PointerType
247 ; CHECK-NEXT: length: 8
248 ; CHECK-NEXT: constType: 1
249 ; CHECK-NEXT: isPointerToDataMember: 0
250 ; CHECK-NEXT: isPointerToMemberFunction: 0
251 ; CHECK-NEXT: RValueReference: 0
252 ; CHECK-NEXT: reference: 0
253 ; CHECK-NEXT: restrictedType: 0
254 ; CHECK-NEXT: unalignedType: 0
255 ; CHECK-NEXT: volatileType: 0
258 ; CHECK-NEXT: symTag: PointerType
259 ; CHECK-NEXT: length: 8
260 ; CHECK-NEXT: constType: 0
261 ; CHECK-NEXT: isPointerToDataMember: 0
262 ; CHECK-NEXT: isPointerToMemberFunction: 1
263 ; CHECK-NEXT: RValueReference: 0
264 ; CHECK-NEXT: reference: 0
265 ; CHECK-NEXT: restrictedType: 0
266 ; CHECK-NEXT: isSingleInheritance: 1
267 ; CHECK-NEXT: unalignedType: 0
268 ; CHECK-NEXT: volatileType: 0
271 ; CHECK-NEXT: symTag: PointerType
272 ; CHECK-NEXT: length: 4
273 ; CHECK-NEXT: constType: 0
274 ; CHECK-NEXT: isPointerToDataMember: 1
275 ; CHECK-NEXT: isPointerToMemberFunction: 0
276 ; CHECK-NEXT: RValueReference: 0
277 ; CHECK-NEXT: reference: 0
278 ; CHECK-NEXT: restrictedType: 0
279 ; CHECK-NEXT: isSingleInheritance: 1
280 ; CHECK-NEXT: unalignedType: 0
281 ; CHECK-NEXT: volatileType: 0
284 ; CHECK-NEXT: symTag: PointerType
285 ; CHECK-NEXT: length: 8
286 ; CHECK-NEXT: constType: 0
287 ; CHECK-NEXT: isPointerToDataMember: 0
288 ; CHECK-NEXT: isPointerToMemberFunction: 1
289 ; CHECK-NEXT: RValueReference: 0
290 ; CHECK-NEXT: reference: 0
291 ; CHECK-NEXT: restrictedType: 0
292 ; CHECK-NEXT: isSingleInheritance: 1
293 ; CHECK-NEXT: unalignedType: 0
294 ; CHECK-NEXT: volatileType: 0
297 ; CHECK-NEXT: symTag: PointerType
298 ; CHECK-NEXT: length: 8
299 ; CHECK-NEXT: constType: 0
300 ; CHECK-NEXT: isPointerToDataMember: 0
301 ; CHECK-NEXT: isPointerToMemberFunction: 0
302 ; CHECK-NEXT: RValueReference: 0
303 ; CHECK-NEXT: reference: 0
304 ; CHECK-NEXT: restrictedType: 0
305 ; CHECK-NEXT: unalignedType: 0
306 ; CHECK-NEXT: volatileType: 0
309 ; CHECK-NEXT: symTag: PointerType
310 ; CHECK-NEXT: length: 8
311 ; CHECK-NEXT: constType: 0
312 ; CHECK-NEXT: isPointerToDataMember: 0
313 ; CHECK-NEXT: isPointerToMemberFunction: 0
314 ; CHECK-NEXT: RValueReference: 0
315 ; CHECK-NEXT: reference: 0
316 ; CHECK-NEXT: restrictedType: 0
317 ; CHECK-NEXT: unalignedType: 0
318 ; CHECK-NEXT: volatileType: 0
321 ; CHECK-NEXT: symTag: PointerType
322 ; CHECK-NEXT: length: 8
323 ; CHECK-NEXT: constType: 0
324 ; CHECK-NEXT: isPointerToDataMember: 0
325 ; CHECK-NEXT: isPointerToMemberFunction: 0
326 ; CHECK-NEXT: RValueReference: 0
327 ; CHECK-NEXT: reference: 0
328 ; CHECK-NEXT: restrictedType: 1
329 ; CHECK-NEXT: unalignedType: 0
330 ; CHECK-NEXT: volatileType: 0
333 ; CHECK-NEXT: symTag: PointerType
334 ; CHECK-NEXT: length: 8
335 ; CHECK-NEXT: constType: 0
336 ; CHECK-NEXT: isPointerToDataMember: 0
337 ; CHECK-NEXT: isPointerToMemberFunction: 0
338 ; CHECK-NEXT: RValueReference: 0
339 ; CHECK-NEXT: reference: 0
340 ; CHECK-NEXT: restrictedType: 0
341 ; CHECK-NEXT: unalignedType: 0
342 ; CHECK-NEXT: volatileType: 0
345 ; CHECK-NEXT: symTag: PointerType
346 ; CHECK-NEXT: length: 8
347 ; CHECK-NEXT: constType: 0
348 ; CHECK-NEXT: isPointerToDataMember: 0
349 ; CHECK-NEXT: isPointerToMemberFunction: 0
350 ; CHECK-NEXT: RValueReference: 0
351 ; CHECK-NEXT: reference: 0
352 ; CHECK-NEXT: restrictedType: 0
353 ; CHECK-NEXT: unalignedType: 0
354 ; CHECK-NEXT: volatileType: 0
357 ; CHECK-NEXT: symTag: PointerType
358 ; CHECK-NEXT: length: 8
359 ; CHECK-NEXT: constType: 0
360 ; CHECK-NEXT: isPointerToDataMember: 0
361 ; CHECK-NEXT: isPointerToMemberFunction: 0
362 ; CHECK-NEXT: RValueReference: 0
363 ; CHECK-NEXT: reference: 0
364 ; CHECK-NEXT: restrictedType: 0
365 ; CHECK-NEXT: unalignedType: 0
366 ; CHECK-NEXT: volatileType: 0
369 ; CHECK-NEXT: symTag: PointerType
370 ; CHECK-NEXT: length: 8
371 ; CHECK-NEXT: constType: 0
372 ; CHECK-NEXT: isPointerToDataMember: 0
373 ; CHECK-NEXT: isPointerToMemberFunction: 0
374 ; CHECK-NEXT: RValueReference: 1
375 ; CHECK-NEXT: reference: 0
376 ; CHECK-NEXT: restrictedType: 0
377 ; CHECK-NEXT: unalignedType: 0
378 ; CHECK-NEXT: volatileType: 0
381 ; CHECK-NEXT: symTag: PointerType
382 ; CHECK-NEXT: length: 8
383 ; CHECK-NEXT: constType: 0
384 ; CHECK-NEXT: isPointerToDataMember: 0
385 ; CHECK-NEXT: isPointerToMemberFunction: 0
386 ; CHECK-NEXT: RValueReference: 0
387 ; CHECK-NEXT: reference: 1
388 ; CHECK-NEXT: restrictedType: 0
389 ; CHECK-NEXT: unalignedType: 0
390 ; CHECK-NEXT: volatileType: 0