1 ; Test that the native PDB reader can enumerate the enum 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.
4 ; Unfortunately since we generate a slightly different (albeit correct)
5 ; class / parent hierarchy, if you re-generate this file you will need to
6 ; actually use the output from llvm-pdbutil *with* the -native flag, but
7 ; before "blessing" it, manually diff against the golden output from
8 ; llvm-pdbutil without the -native flag and verifying that there are no
9 ; substantive differences aside from the various symbol ids.
11 ; RUN: llvm-pdbutil pretty -native -enums %p/../Inputs/every-enum.pdb \
12 ; RUN: | FileCheck -check-prefix=ENUMS %s
13 ; RUN: llvm-pdbutil diadump -hierarchy -native -enums %p/../Inputs/every-enum.pdb \
14 ; RUN: | FileCheck -check-prefix=DUMP %s
17 ENUMS: enum I8 : char {
22 ENUMS: enum I16 : short {
28 ENUMS: I32A = -2147483648
30 ENUMS: I32C = 2147483647
32 ENUMS: enum I64 : __int64 {
33 ENUMS: I64A = -9223372036854775808
35 ENUMS: I64C = 9223372036854775807
37 ENUMS: enum U8 : unsigned char {
41 ENUMS: enum U16 : unsigned short {
45 ENUMS: enum U32 : unsigned int {
47 ENUMS: U32B = 4294967295
49 ENUMS: enum U64 : unsigned __int64 {
51 ; FIXME: This should be UINT64_MAX. Is the compiler encoding it wrong or
52 ; are we decoding it wrong?
55 ENUMS: enum Char16 : unsigned short {
59 ENUMS: enum Char32 : unsigned int {
63 ENUMS: enum WChar : unsigned short {
67 ENUMS: enum Bool : bool {
75 ENUMS: enum Struct::Nested {
79 ENUMS: const volatile enum EC
86 DUMP: lexicalParentId: 0
92 DUMP: hasAssignmentOperator: 0
93 DUMP: hasCastOperator: 0
94 DUMP: hasNestedTypes: 0
95 DUMP: overloadedOperator: 0
96 DUMP: isInterfaceUdt: 0
102 DUMP: unalignedType: 0
104 DUMP: volatileType: 0
108 DUMP: classParentId: 2
109 DUMP: lexicalParentId: 0
112 DUMP: dataKind: const
113 DUMP: locationType: constant
115 DUMP: unalignedType: 0
116 DUMP: volatileType: 0
122 DUMP: classParentId: 2
123 DUMP: lexicalParentId: 0
126 DUMP: dataKind: const
127 DUMP: locationType: constant
129 DUMP: unalignedType: 0
130 DUMP: volatileType: 0
136 DUMP: classParentId: 2
137 DUMP: lexicalParentId: 0
140 DUMP: dataKind: const
141 DUMP: locationType: constant
143 DUMP: unalignedType: 0
144 DUMP: volatileType: 0
152 DUMP: lexicalParentId: 0
158 DUMP: hasAssignmentOperator: 0
159 DUMP: hasCastOperator: 0
160 DUMP: hasNestedTypes: 0
161 DUMP: overloadedOperator: 0
162 DUMP: isInterfaceUdt: 0
168 DUMP: unalignedType: 0
170 DUMP: volatileType: 0
174 DUMP: classParentId: 7
175 DUMP: lexicalParentId: 0
178 DUMP: dataKind: const
179 DUMP: locationType: constant
181 DUMP: unalignedType: 0
182 DUMP: volatileType: 0
188 DUMP: classParentId: 7
189 DUMP: lexicalParentId: 0
192 DUMP: dataKind: const
193 DUMP: locationType: constant
195 DUMP: unalignedType: 0
196 DUMP: volatileType: 0
202 DUMP: classParentId: 7
203 DUMP: lexicalParentId: 0
206 DUMP: dataKind: const
207 DUMP: locationType: constant
209 DUMP: unalignedType: 0
210 DUMP: volatileType: 0
218 DUMP: lexicalParentId: 0
224 DUMP: hasAssignmentOperator: 0
225 DUMP: hasCastOperator: 0
226 DUMP: hasNestedTypes: 0
227 DUMP: overloadedOperator: 0
228 DUMP: isInterfaceUdt: 0
234 DUMP: unalignedType: 0
236 DUMP: volatileType: 0
240 DUMP: classParentId: 12
241 DUMP: lexicalParentId: 0
244 DUMP: dataKind: const
245 DUMP: locationType: constant
247 DUMP: unalignedType: 0
248 DUMP: volatileType: 0
249 DUMP: value: -2147483648
254 DUMP: classParentId: 12
255 DUMP: lexicalParentId: 0
258 DUMP: dataKind: const
259 DUMP: locationType: constant
261 DUMP: unalignedType: 0
262 DUMP: volatileType: 0
268 DUMP: classParentId: 12
269 DUMP: lexicalParentId: 0
272 DUMP: dataKind: const
273 DUMP: locationType: constant
275 DUMP: unalignedType: 0
276 DUMP: volatileType: 0
277 DUMP: value: 2147483647
284 DUMP: lexicalParentId: 0
290 DUMP: hasAssignmentOperator: 0
291 DUMP: hasCastOperator: 0
292 DUMP: hasNestedTypes: 0
293 DUMP: overloadedOperator: 0
294 DUMP: isInterfaceUdt: 0
300 DUMP: unalignedType: 0
302 DUMP: volatileType: 0
306 DUMP: classParentId: 17
307 DUMP: lexicalParentId: 0
310 DUMP: dataKind: const
311 DUMP: locationType: constant
313 DUMP: unalignedType: 0
314 DUMP: volatileType: 0
315 DUMP: value: -9223372036854775808
320 DUMP: classParentId: 17
321 DUMP: lexicalParentId: 0
324 DUMP: dataKind: const
325 DUMP: locationType: constant
327 DUMP: unalignedType: 0
328 DUMP: volatileType: 0
334 DUMP: classParentId: 17
335 DUMP: lexicalParentId: 0
338 DUMP: dataKind: const
339 DUMP: locationType: constant
341 DUMP: unalignedType: 0
342 DUMP: volatileType: 0
343 DUMP: value: 9223372036854775807
350 DUMP: lexicalParentId: 0
356 DUMP: hasAssignmentOperator: 0
357 DUMP: hasCastOperator: 0
358 DUMP: hasNestedTypes: 0
359 DUMP: overloadedOperator: 0
360 DUMP: isInterfaceUdt: 0
366 DUMP: unalignedType: 0
368 DUMP: volatileType: 0
372 DUMP: classParentId: 22
373 DUMP: lexicalParentId: 0
376 DUMP: dataKind: const
377 DUMP: locationType: constant
379 DUMP: unalignedType: 0
380 DUMP: volatileType: 0
386 DUMP: classParentId: 22
387 DUMP: lexicalParentId: 0
390 DUMP: dataKind: const
391 DUMP: locationType: constant
393 DUMP: unalignedType: 0
394 DUMP: volatileType: 0
402 DUMP: lexicalParentId: 0
408 DUMP: hasAssignmentOperator: 0
409 DUMP: hasCastOperator: 0
410 DUMP: hasNestedTypes: 0
411 DUMP: overloadedOperator: 0
412 DUMP: isInterfaceUdt: 0
418 DUMP: unalignedType: 0
420 DUMP: volatileType: 0
424 DUMP: classParentId: 26
425 DUMP: lexicalParentId: 0
428 DUMP: dataKind: const
429 DUMP: locationType: constant
431 DUMP: unalignedType: 0
432 DUMP: volatileType: 0
438 DUMP: classParentId: 26
439 DUMP: lexicalParentId: 0
442 DUMP: dataKind: const
443 DUMP: locationType: constant
445 DUMP: unalignedType: 0
446 DUMP: volatileType: 0
454 DUMP: lexicalParentId: 0
460 DUMP: hasAssignmentOperator: 0
461 DUMP: hasCastOperator: 0
462 DUMP: hasNestedTypes: 0
463 DUMP: overloadedOperator: 0
464 DUMP: isInterfaceUdt: 0
470 DUMP: unalignedType: 0
472 DUMP: volatileType: 0
476 DUMP: classParentId: 30
477 DUMP: lexicalParentId: 0
480 DUMP: dataKind: const
481 DUMP: locationType: constant
483 DUMP: unalignedType: 0
484 DUMP: volatileType: 0
490 DUMP: classParentId: 30
491 DUMP: lexicalParentId: 0
494 DUMP: dataKind: const
495 DUMP: locationType: constant
497 DUMP: unalignedType: 0
498 DUMP: volatileType: 0
499 DUMP: value: 4294967295
506 DUMP: lexicalParentId: 0
512 DUMP: hasAssignmentOperator: 0
513 DUMP: hasCastOperator: 0
514 DUMP: hasNestedTypes: 0
515 DUMP: overloadedOperator: 0
516 DUMP: isInterfaceUdt: 0
522 DUMP: unalignedType: 0
524 DUMP: volatileType: 0
528 DUMP: classParentId: 34
529 DUMP: lexicalParentId: 0
532 DUMP: dataKind: const
533 DUMP: locationType: constant
535 DUMP: unalignedType: 0
536 DUMP: volatileType: 0
542 DUMP: classParentId: 34
543 DUMP: lexicalParentId: 0
546 DUMP: dataKind: const
547 DUMP: locationType: constant
549 DUMP: unalignedType: 0
550 DUMP: volatileType: 0
558 DUMP: lexicalParentId: 0
564 DUMP: hasAssignmentOperator: 0
565 DUMP: hasCastOperator: 0
566 DUMP: hasNestedTypes: 0
567 DUMP: overloadedOperator: 0
568 DUMP: isInterfaceUdt: 0
574 DUMP: unalignedType: 0
576 DUMP: volatileType: 0
580 DUMP: classParentId: 38
581 DUMP: lexicalParentId: 0
584 DUMP: dataKind: const
585 DUMP: locationType: constant
587 DUMP: unalignedType: 0
588 DUMP: volatileType: 0
594 DUMP: classParentId: 38
595 DUMP: lexicalParentId: 0
598 DUMP: dataKind: const
599 DUMP: locationType: constant
601 DUMP: unalignedType: 0
602 DUMP: volatileType: 0
610 DUMP: lexicalParentId: 0
616 DUMP: hasAssignmentOperator: 0
617 DUMP: hasCastOperator: 0
618 DUMP: hasNestedTypes: 0
619 DUMP: overloadedOperator: 0
620 DUMP: isInterfaceUdt: 0
626 DUMP: unalignedType: 0
628 DUMP: volatileType: 0
632 DUMP: classParentId: 41
633 DUMP: lexicalParentId: 0
636 DUMP: dataKind: const
637 DUMP: locationType: constant
639 DUMP: unalignedType: 0
640 DUMP: volatileType: 0
646 DUMP: classParentId: 41
647 DUMP: lexicalParentId: 0
650 DUMP: dataKind: const
651 DUMP: locationType: constant
653 DUMP: unalignedType: 0
654 DUMP: volatileType: 0
662 DUMP: lexicalParentId: 0
668 DUMP: hasAssignmentOperator: 0
669 DUMP: hasCastOperator: 0
670 DUMP: hasNestedTypes: 0
671 DUMP: overloadedOperator: 0
672 DUMP: isInterfaceUdt: 0
678 DUMP: unalignedType: 0
680 DUMP: volatileType: 0
684 DUMP: classParentId: 45
685 DUMP: lexicalParentId: 0
688 DUMP: dataKind: const
689 DUMP: locationType: constant
691 DUMP: unalignedType: 0
692 DUMP: volatileType: 0
698 DUMP: classParentId: 45
699 DUMP: lexicalParentId: 0
702 DUMP: dataKind: const
703 DUMP: locationType: constant
705 DUMP: unalignedType: 0
706 DUMP: volatileType: 0
714 DUMP: lexicalParentId: 0
720 DUMP: hasAssignmentOperator: 0
721 DUMP: hasCastOperator: 0
722 DUMP: hasNestedTypes: 0
723 DUMP: overloadedOperator: 0
724 DUMP: isInterfaceUdt: 0
730 DUMP: unalignedType: 0
732 DUMP: volatileType: 0
736 DUMP: classParentId: 48
737 DUMP: lexicalParentId: 0
740 DUMP: dataKind: const
741 DUMP: locationType: constant
743 DUMP: unalignedType: 0
744 DUMP: volatileType: 0
750 DUMP: classParentId: 48
751 DUMP: lexicalParentId: 0
754 DUMP: dataKind: const
755 DUMP: locationType: constant
757 DUMP: unalignedType: 0
758 DUMP: volatileType: 0
762 DUMP: symIndexId: 113
765 DUMP: lexicalParentId: 0
771 DUMP: hasAssignmentOperator: 0
772 DUMP: hasCastOperator: 0
773 DUMP: hasNestedTypes: 0
774 DUMP: overloadedOperator: 0
775 DUMP: isInterfaceUdt: 0
781 DUMP: unalignedType: 0
783 DUMP: volatileType: 0
785 DUMP: symIndexId: 114
787 DUMP: classParentId: 113
788 DUMP: lexicalParentId: 0
791 DUMP: dataKind: const
792 DUMP: locationType: constant
794 DUMP: unalignedType: 0
795 DUMP: volatileType: 0
799 DUMP: symIndexId: 115
801 DUMP: classParentId: 113
802 DUMP: lexicalParentId: 0
805 DUMP: dataKind: const
806 DUMP: locationType: constant
808 DUMP: unalignedType: 0
809 DUMP: volatileType: 0
814 DUMP: symIndexId: 116
817 DUMP: lexicalParentId: 0
818 DUMP: name: Struct::Nested
823 DUMP: hasAssignmentOperator: 0
824 DUMP: hasCastOperator: 0
825 DUMP: hasNestedTypes: 0
826 DUMP: overloadedOperator: 0
827 DUMP: isInterfaceUdt: 0
833 DUMP: unalignedType: 0
835 DUMP: volatileType: 0
837 DUMP: symIndexId: 114
839 DUMP: classParentId: 113
840 DUMP: lexicalParentId: 0
843 DUMP: dataKind: const
844 DUMP: locationType: constant
846 DUMP: unalignedType: 0
847 DUMP: volatileType: 0
851 DUMP: symIndexId: 115
853 DUMP: classParentId: 113
854 DUMP: lexicalParentId: 0
857 DUMP: dataKind: const
858 DUMP: locationType: constant
860 DUMP: unalignedType: 0
861 DUMP: volatileType: 0
866 DUMP: symIndexId: 117
869 DUMP: lexicalParentId: 0
872 DUMP: unmodifiedTypeId: 113
876 DUMP: hasAssignmentOperator: 0
877 DUMP: hasCastOperator: 0
878 DUMP: hasNestedTypes: 0
879 DUMP: overloadedOperator: 0
880 DUMP: isInterfaceUdt: 0
886 DUMP: unalignedType: 0
888 DUMP: volatileType: 1 {
889 DUMP: symIndexId: 114
891 DUMP: classParentId: 113
892 DUMP: lexicalParentId: 0
895 DUMP: dataKind: const
896 DUMP: locationType: constant
898 DUMP: unalignedType: 0
899 DUMP: volatileType: 0
903 DUMP: symIndexId: 115
905 DUMP: classParentId: 113
906 DUMP: lexicalParentId: 0
909 DUMP: dataKind: const
910 DUMP: locationType: constant
912 DUMP: unalignedType: 0
913 DUMP: volatileType: 0