File: every-type.test

package info (click to toggle)
llvm-toolchain-6.0 1%3A6.0.1-10
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 598,080 kB
  • sloc: cpp: 3,046,253; ansic: 595,057; asm: 271,965; python: 128,926; objc: 106,554; sh: 21,906; lisp: 10,191; pascal: 6,094; ml: 5,544; perl: 5,265; makefile: 2,227; cs: 2,027; xml: 686; php: 212; csh: 117
file content (261 lines) | stat: -rw-r--r-- 17,506 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
The test input (every-type.pdb) is generated from some short and trivial C++ code
that exercises the entire type system to generate every possible type record that
we claim to understand.  We then test this in two ways:
  1) We just dump the output for the purposes of readability.  This tests that we
     we can dump every possible type record.
  2) We dump the output to yaml, and then re-generate a PDB with the same type
     stream, and then run test 1 on the new PDB.  This verifies that the PDB
     hasn't changed.


RUN: llvm-pdbutil dump -type-index=0x1018,0x102A,0x103B,0x1093,0x1095,0x1096,0x1098 \
RUN:   -dependents %p/Inputs/every-type.pdb | FileCheck --check-prefix=TYPES %s

RUN: llvm-pdbutil pdb2yaml -tpi-stream -ipi-stream %p/Inputs/every-type.pdb > %t.pdb.yaml
RUN: llvm-pdbutil yaml2pdb -pdb=%t.yaml.pdb %t.pdb.yaml
RUN: llvm-pdbutil dump -type-index=0x1018,0x102A,0x103B,0x1093,0x1095,0x1096,0x1098 \
RUN:   -dependents %t.yaml.pdb | FileCheck --check-prefix=TYPES %s

TYPES:                           Types (TPI Stream)
TYPES-NEXT: ============================================================
TYPES-NEXT:   Showing 7 records and their dependents (73 records total)
TYPES-NEXT:   0x1005 | LF_MODIFIER [size = 12]
TYPES-NEXT:            referent = 0x0074 (int), modifiers = const
TYPES-NEXT:   0x1006 | LF_CLASS [size = 48] `FooClass`
TYPES-NEXT:            unique name: `.?AVFooClass@@`
TYPES-NEXT:            vtable: <no type>, base list: <no type>, field list: <no type>
TYPES-NEXT:            options: forward ref | has unique name
TYPES-NEXT:   0x1007 | LF_VTSHAPE [size = 8]
TYPES-NEXT:   0x1008 | LF_POINTER [size = 12]
TYPES-NEXT:            referent = 0x1007, mode = pointer, opts = None, kind = ptr32
TYPES-NEXT:   0x1009 | LF_CLASS [size = 44] `Inherit`
TYPES-NEXT:            unique name: `.?AVInherit@@`
TYPES-NEXT:            vtable: <no type>, base list: <no type>, field list: <no type>
TYPES-NEXT:            options: forward ref | has unique name
TYPES-NEXT:   0x100A | LF_POINTER [size = 12]
TYPES-NEXT:            referent = 0x1009, mode = pointer, opts = const, kind = ptr32
TYPES-NEXT:   0x100B | LF_ARGLIST [size = 8]
TYPES-NEXT:   0x100C | LF_MFUNCTION [size = 28]
TYPES-NEXT:            return type = 0x0003 (void), # args = 0, param list = 0x100B
TYPES-NEXT:            class type = 0x1009, this type = 0x100A, this adjust = 0
TYPES-NEXT:            calling conv = thiscall, options = None
TYPES-NEXT:   0x100D | LF_MODIFIER [size = 12]
TYPES-NEXT:            referent = 0x1009, modifiers = const
TYPES-NEXT:   0x100E | LF_POINTER [size = 12]
TYPES-NEXT:            referent = 0x100D, mode = ref, opts = None, kind = ptr32
TYPES-NEXT:   0x100F | LF_ARGLIST [size = 12]
TYPES-NEXT:            0x100E: `const Inherit&`
TYPES-NEXT:   0x1010 | LF_MFUNCTION [size = 28]
TYPES-NEXT:            return type = 0x0003 (void), # args = 1, param list = 0x100F
TYPES-NEXT:            class type = 0x1009, this type = 0x100A, this adjust = 0
TYPES-NEXT:            calling conv = thiscall, options = constructor
TYPES-NEXT:   0x1011 | LF_MFUNCTION [size = 28]
TYPES-NEXT:            return type = 0x0003 (void), # args = 0, param list = 0x100B
TYPES-NEXT:            class type = 0x1009, this type = 0x100A, this adjust = 0
TYPES-NEXT:            calling conv = thiscall, options = constructor
TYPES-NEXT:   0x1012 | LF_METHODLIST [size = 20]
TYPES-NEXT:            - Method [type = 0x1010, vftable offset = -1, attrs = public compiler-generated]
TYPES-NEXT:            - Method [type = 0x1011, vftable offset = -1, attrs = public compiler-generated]
TYPES-NEXT:   0x1013 | LF_POINTER [size = 12]
TYPES-NEXT:            referent = 0x1009, mode = ref, opts = None, kind = ptr32
TYPES-NEXT:   0x1014 | LF_MFUNCTION [size = 28]
TYPES-NEXT:            return type = 0x1013, # args = 1, param list = 0x100F
TYPES-NEXT:            class type = 0x1009, this type = 0x100A, this adjust = 0
TYPES-NEXT:            calling conv = thiscall, options = None
TYPES-NEXT:   0x1015 | LF_ARGLIST [size = 12]
TYPES-NEXT:            0x0075 (unsigned): `unsigned`
TYPES-NEXT:   0x1016 | LF_MFUNCTION [size = 28]
TYPES-NEXT:            return type = 0x0403 (void*), # args = 1, param list = 0x1015
TYPES-NEXT:            class type = 0x1009, this type = 0x100A, this adjust = 0
TYPES-NEXT:            calling conv = thiscall, options = None
TYPES-NEXT:   0x1017 | LF_FIELDLIST [size = 152]
TYPES-NEXT:            - LF_BCLASS
TYPES-NEXT:              type = 0x1006, offset = 4, attrs = public
TYPES-NEXT:            - LF_VFUNCTAB type = 0x1008
TYPES-NEXT:            - LF_ONEMETHOD [name = `~Inherit`]
TYPES-NEXT:              type = 0x100C, vftable offset = 0, attrs = public intro virtual
TYPES-NEXT:            - LF_METHOD [name = `Inherit`, # overloads = 2, overload list = 0x1012]
TYPES-NEXT:            - LF_ONEMETHOD [name = `operator=`]
TYPES-NEXT:              type = 0x1014, vftable offset = -1, attrs = public compiler-generated
TYPES-NEXT:            - LF_ONEMETHOD [name = `__local_vftable_ctor_closure`]
TYPES-NEXT:              type = 0x100C, vftable offset = -1, attrs = public compiler-generated
TYPES-NEXT:            - LF_ONEMETHOD [name = `__vecDelDtor`]
TYPES-NEXT:              type = 0x1016, vftable offset = 0, attrs = public intro virtual compiler-generated
TYPES-NEXT:   0x1018 | LF_CLASS [size = 44] `Inherit`
TYPES-NEXT:            unique name: `.?AVInherit@@`
TYPES-NEXT:            vtable: 0x1007, base list: <no type>, field list: 0x1017
TYPES-NEXT:            options: has ctor / dtor | has unique name | overloaded operator | overloaded operator=
TYPES-NEXT:   0x1019 | LF_POINTER [size = 12]
TYPES-NEXT:            referent = 0x1005, mode = pointer, opts = None, kind = ptr32
TYPES-NEXT:   0x101A | LF_CLASS [size = 48] `VInherit`
TYPES-NEXT:            unique name: `.?AVVInherit@@`
TYPES-NEXT:            vtable: <no type>, base list: <no type>, field list: <no type>
TYPES-NEXT:            options: forward ref | has unique name
TYPES-NEXT:   0x101B | LF_POINTER [size = 12]
TYPES-NEXT:            referent = 0x101A, mode = pointer, opts = const, kind = ptr32
TYPES-NEXT:   0x101C | LF_POINTER [size = 12]
TYPES-NEXT:            referent = 0x101A, mode = rvalue ref, opts = None, kind = ptr32
TYPES-NEXT:   0x101D | LF_ARGLIST [size = 12]
TYPES-NEXT:            0x101C: `VInherit&&`
TYPES-NEXT:   0x101E | LF_MFUNCTION [size = 28]
TYPES-NEXT:            return type = 0x0003 (void), # args = 1, param list = 0x101D
TYPES-NEXT:            class type = 0x101A, this type = 0x101B, this adjust = 0
TYPES-NEXT:            calling conv = thiscall, options = constructor with virtual bases | constructor
TYPES-NEXT:   0x101F | LF_MODIFIER [size = 12]
TYPES-NEXT:            referent = 0x101A, modifiers = const
TYPES-NEXT:   0x1020 | LF_POINTER [size = 12]
TYPES-NEXT:            referent = 0x101F, mode = ref, opts = None, kind = ptr32
TYPES-NEXT:   0x1021 | LF_ARGLIST [size = 12]
TYPES-NEXT:            0x1020: `const VInherit&`
TYPES-NEXT:   0x1022 | LF_MFUNCTION [size = 28]
TYPES-NEXT:            return type = 0x0003 (void), # args = 1, param list = 0x1021
TYPES-NEXT:            class type = 0x101A, this type = 0x101B, this adjust = 0
TYPES-NEXT:            calling conv = thiscall, options = constructor with virtual bases | constructor
TYPES-NEXT:   0x1023 | LF_MFUNCTION [size = 28]
TYPES-NEXT:            return type = 0x0003 (void), # args = 0, param list = 0x100B
TYPES-NEXT:            class type = 0x101A, this type = 0x101B, this adjust = 0
TYPES-NEXT:            calling conv = thiscall, options = constructor with virtual bases | constructor
TYPES-NEXT:   0x1024 | LF_METHODLIST [size = 28]
TYPES-NEXT:            - Method [type = 0x101E, vftable offset = -1, attrs = public compiler-generated]
TYPES-NEXT:            - Method [type = 0x1022, vftable offset = -1, attrs = public compiler-generated]
TYPES-NEXT:            - Method [type = 0x1023, vftable offset = -1, attrs = public compiler-generated]
TYPES-NEXT:   0x1025 | LF_POINTER [size = 12]
TYPES-NEXT:            referent = 0x101A, mode = ref, opts = None, kind = ptr32
TYPES-NEXT:   0x1026 | LF_MFUNCTION [size = 28]
TYPES-NEXT:            return type = 0x1025, # args = 1, param list = 0x101D
TYPES-NEXT:            class type = 0x101A, this type = 0x101B, this adjust = 0
TYPES-NEXT:            calling conv = thiscall, options = None
TYPES-NEXT:   0x1027 | LF_MFUNCTION [size = 28]
TYPES-NEXT:            return type = 0x1025, # args = 1, param list = 0x1021
TYPES-NEXT:            class type = 0x101A, this type = 0x101B, this adjust = 0
TYPES-NEXT:            calling conv = thiscall, options = None
TYPES-NEXT:   0x1028 | LF_METHODLIST [size = 20]
TYPES-NEXT:            - Method [type = 0x1026, vftable offset = -1, attrs = public compiler-generated]
TYPES-NEXT:            - Method [type = 0x1027, vftable offset = -1, attrs = public compiler-generated]
TYPES-NEXT:   0x1029 | LF_FIELDLIST [size = 60]
TYPES-NEXT:            - LF_VBCLASS
TYPES-NEXT:              base = 0x1006, vbptr = 0x1019, vbptr offset = 0, vtable index = 1
TYPES-NEXT:              attrs = public
TYPES-NEXT:            - LF_METHOD [name = `VInherit`, # overloads = 3, overload list = 0x1024]
TYPES-NEXT:            - LF_METHOD [name = `operator=`, # overloads = 2, overload list = 0x1028]
TYPES-NEXT:   0x102A | LF_CLASS [size = 48] `VInherit`
TYPES-NEXT:            unique name: `.?AVVInherit@@`
TYPES-NEXT:            vtable: <no type>, base list: <no type>, field list: 0x1029
TYPES-NEXT:            options: has ctor / dtor | has unique name | overloaded operator | overloaded operator=
TYPES-NEXT:   0x102B | LF_CLASS [size = 48] `IVInherit`
TYPES-NEXT:            unique name: `.?AVIVInherit@@`
TYPES-NEXT:            vtable: <no type>, base list: <no type>, field list: <no type>
TYPES-NEXT:            options: forward ref | has unique name
TYPES-NEXT:   0x102C | LF_POINTER [size = 12]
TYPES-NEXT:            referent = 0x102B, mode = pointer, opts = const, kind = ptr32
TYPES-NEXT:   0x102D | LF_POINTER [size = 12]
TYPES-NEXT:            referent = 0x102B, mode = rvalue ref, opts = None, kind = ptr32
TYPES-NEXT:   0x102E | LF_ARGLIST [size = 12]
TYPES-NEXT:            0x102D: `IVInherit&&`
TYPES-NEXT:   0x102F | LF_MFUNCTION [size = 28]
TYPES-NEXT:            return type = 0x0003 (void), # args = 1, param list = 0x102E
TYPES-NEXT:            class type = 0x102B, this type = 0x102C, this adjust = 0
TYPES-NEXT:            calling conv = thiscall, options = constructor with virtual bases | constructor
TYPES-NEXT:   0x1030 | LF_MODIFIER [size = 12]
TYPES-NEXT:            referent = 0x102B, modifiers = const
TYPES-NEXT:   0x1031 | LF_POINTER [size = 12]
TYPES-NEXT:            referent = 0x1030, mode = ref, opts = None, kind = ptr32
TYPES-NEXT:   0x1032 | LF_ARGLIST [size = 12]
TYPES-NEXT:            0x1031: `const IVInherit&`
TYPES-NEXT:   0x1033 | LF_MFUNCTION [size = 28]
TYPES-NEXT:            return type = 0x0003 (void), # args = 1, param list = 0x1032
TYPES-NEXT:            class type = 0x102B, this type = 0x102C, this adjust = 0
TYPES-NEXT:            calling conv = thiscall, options = constructor with virtual bases | constructor
TYPES-NEXT:   0x1034 | LF_MFUNCTION [size = 28]
TYPES-NEXT:            return type = 0x0003 (void), # args = 0, param list = 0x100B
TYPES-NEXT:            class type = 0x102B, this type = 0x102C, this adjust = 0
TYPES-NEXT:            calling conv = thiscall, options = constructor with virtual bases | constructor
TYPES-NEXT:   0x1035 | LF_METHODLIST [size = 28]
TYPES-NEXT:            - Method [type = 0x102F, vftable offset = -1, attrs = public compiler-generated]
TYPES-NEXT:            - Method [type = 0x1033, vftable offset = -1, attrs = public compiler-generated]
TYPES-NEXT:            - Method [type = 0x1034, vftable offset = -1, attrs = public compiler-generated]
TYPES-NEXT:   0x1036 | LF_POINTER [size = 12]
TYPES-NEXT:            referent = 0x102B, mode = ref, opts = None, kind = ptr32
TYPES-NEXT:   0x1037 | LF_MFUNCTION [size = 28]
TYPES-NEXT:            return type = 0x1036, # args = 1, param list = 0x102E
TYPES-NEXT:            class type = 0x102B, this type = 0x102C, this adjust = 0
TYPES-NEXT:            calling conv = thiscall, options = None
TYPES-NEXT:   0x1038 | LF_MFUNCTION [size = 28]
TYPES-NEXT:            return type = 0x1036, # args = 1, param list = 0x1032
TYPES-NEXT:            class type = 0x102B, this type = 0x102C, this adjust = 0
TYPES-NEXT:            calling conv = thiscall, options = None
TYPES-NEXT:   0x1039 | LF_METHODLIST [size = 20]
TYPES-NEXT:            - Method [type = 0x1037, vftable offset = -1, attrs = public compiler-generated]
TYPES-NEXT:            - Method [type = 0x1038, vftable offset = -1, attrs = public compiler-generated]
TYPES-NEXT:   0x103A | LF_FIELDLIST [size = 72]
TYPES-NEXT:            - LF_BCLASS
TYPES-NEXT:              type = 0x101A, offset = 0, attrs = public
TYPES-NEXT:            - LF_IVBCLASS
TYPES-NEXT:              base = 0x1006, vbptr = 0x1019, vbptr offset = 0, vtable index = 1
TYPES-NEXT:              attrs = public
TYPES-NEXT:            - LF_METHOD [name = `IVInherit`, # overloads = 3, overload list = 0x1035]
TYPES-NEXT:            - LF_METHOD [name = `operator=`, # overloads = 2, overload list = 0x1039]
TYPES-NEXT:   0x103B | LF_CLASS [size = 48] `IVInherit`
TYPES-NEXT:            unique name: `.?AVIVInherit@@`
TYPES-NEXT:            vtable: <no type>, base list: <no type>, field list: 0x103A
TYPES-NEXT:            options: has ctor / dtor | has unique name | overloaded operator | overloaded operator=
TYPES-NEXT:   0x1087 | LF_FIELDLIST [size = 28]
TYPES-NEXT:            - LF_ENUMERATE [A = 0]
TYPES-NEXT:            - LF_ENUMERATE [B = 1]
TYPES-NEXT:            - LF_ENUMERATE [C = 2]
TYPES-NEXT:   0x1088 | LF_ENUM [size = 64] `FooClass::NestedEnum`
TYPES-NEXT:            unique name: `.?AW4NestedEnum@FooClass@@`
TYPES-NEXT:            field list: 0x1087, underlying type: 0x0074 (int)
TYPES-NEXT:            options: has unique name | is nested
TYPES-NEXT:   0x1089 | LF_POINTER [size = 12]
TYPES-NEXT:            referent = 0x1006, mode = pointer, opts = const, kind = ptr32
TYPES-NEXT:   0x108A | LF_MFUNCTION [size = 28]
TYPES-NEXT:            return type = 0x0003 (void), # args = 0, param list = 0x100B
TYPES-NEXT:            class type = 0x1006, this type = 0x1089, this adjust = 0
TYPES-NEXT:            calling conv = thiscall, options = None
TYPES-NEXT:   0x108B | LF_ARGLIST [size = 16]
TYPES-NEXT:            0x0074 (int): `int`
TYPES-NEXT:            0x0074 (int): `int`
TYPES-NEXT:   0x108C | LF_MFUNCTION [size = 28]
TYPES-NEXT:            return type = 0x0003 (void), # args = 2, param list = 0x108B
TYPES-NEXT:            class type = 0x1006, this type = 0x1089, this adjust = 0
TYPES-NEXT:            calling conv = thiscall, options = None
TYPES-NEXT:   0x108D | LF_ARGLIST [size = 12]
TYPES-NEXT:            0x0074 (int): `int`
TYPES-NEXT:   0x108E | LF_MFUNCTION [size = 28]
TYPES-NEXT:            return type = 0x0003 (void), # args = 1, param list = 0x108D
TYPES-NEXT:            class type = 0x1006, this type = 0x1089, this adjust = 0
TYPES-NEXT:            calling conv = thiscall, options = None
TYPES-NEXT:   0x108F | LF_METHODLIST [size = 20]
TYPES-NEXT:            - Method [type = 0x108C, vftable offset = -1, attrs = private]
TYPES-NEXT:            - Method [type = 0x108E, vftable offset = -1, attrs = private]
TYPES-NEXT:   0x1090 | LF_BITFIELD [size = 12]
TYPES-NEXT:            type = 0x0074 (int), bit offset = 0, # bits = 4
TYPES-NEXT:   0x1091 | LF_BITFIELD [size = 12]
TYPES-NEXT:            type = 0x0074 (int), bit offset = 4, # bits = 4
TYPES-NEXT:   0x1092 | LF_FIELDLIST [size = 164]
TYPES-NEXT:            - LF_NESTTYPE [name = `NestedEnum`, parent = 0x1088]
TYPES-NEXT:            - LF_ONEMETHOD [name = `RegularMethod`]
TYPES-NEXT:              type = 0x108A, vftable offset = -1, attrs = private
TYPES-NEXT:            - LF_METHOD [name = `OverloadedMethod`, # overloads = 2, overload list = 0x108F]
TYPES-NEXT:            - LF_MEMBER [name = `HiNibble`, Type = 0x1090, offset = 0, attrs = private]
TYPES-NEXT:            - LF_MEMBER [name = `LoNibble`, Type = 0x1091, offset = 0, attrs = private]
TYPES-NEXT:            - LF_MEMBER [name = `EnumVariable`, Type = 0x1088, offset = 4, attrs = private]
TYPES-NEXT:            - LF_STMEMBER [name = `StaticMember`, type = 0x0403 (void*), attrs = private]
TYPES-NEXT:   0x1093 | LF_CLASS [size = 48] `FooClass`
TYPES-NEXT:            unique name: `.?AVFooClass@@`
TYPES-NEXT:            vtable: <no type>, base list: <no type>, field list: 0x1092
TYPES-NEXT:            options: contains nested class | has unique name
TYPES-NEXT:   0x1094 | LF_FIELDLIST [size = 16]
TYPES-NEXT:            - LF_MEMBER [name = `X`, Type = 0x0074 (int), offset = 0, attrs = public]
TYPES-NEXT:   0x1095 | LF_UNION [size = 40] `TheUnion`
TYPES-NEXT:            unique name: `.?ATTheUnion@@`
TYPES-NEXT:            field list: 0x1094
TYPES-NEXT:            options: has unique name | sealed
TYPES-NEXT:   0x1096 | LF_PROCEDURE [size = 16]
TYPES-NEXT:            return type = 0x0003 (void), # args = 0, param list = 0x100B
TYPES-NEXT:            calling conv = cdecl, options = None
TYPES-NEXT:   0x1097 | LF_POINTER [size = 12]
TYPES-NEXT:            referent = 0x1096, mode = pointer, opts = const, kind = ptr32
TYPES-NEXT:   0x1098 | LF_ARRAY [size = 16]
TYPES-NEXT:            size: 4, index type: 0x0022 (unsigned long), element type: 0x1097